Re: [fpc-pascal]RE: force redraw on hscale

2004-04-27 Thread Marc Santhoff
Am Di, den 27.04.2004 schrieb Jeff Pohlmeyer um 07:58:
> > My question: how can I force a redraw on selected 
> > widgets or the whole window when needed?
> 
> Maybe this will help:
> 
>   procedure UpdateWidget(w:pGtkWidget);
>   var
> update_rect: tGdkRectangle;
>   begin
> update_rect.x:=0;
> update_rect.y:=0;
> update_rect.width:=w^.allocation.width;
> update_rect.height:=w^.allocation.height;
> gtk_widget_draw(w, @update_rect);
>   end;

Hi Jeff!

I think it does work, but the color on the GtkHScale does not really
change, only after changing the value at the slider, as before.

I added (hint from the gtk mailing list) this:

gtk_widget_queue_draw(GTK_WIDGET(scales[0]));
while (gtk_events_pending()=gtk_true) do gtk_main_iteration ();

to process all pending draw event afterwards, but no luck. :(

Must be a bug or some plan I do not get.

Has anyone ever managed to change a GtkHScales color on the fly?

I can do it at startup from the ressource file, but changing afterwards
is not possible. But it does work when i minimize the window and restore
it! And it is colorizing the whole bar, not only the places where the
slider steps ...

Any further hints?


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]RE: force redraw on hscale

2004-04-27 Thread Marc Santhoff
Am Di, den 27.04.2004 schrieb Jeff Pohlmeyer um 07:58:
> > My question: how can I force a redraw on selected 
> > widgets or the whole window when needed?
> 
> Maybe this will help:
> 
>   procedure UpdateWidget(w:pGtkWidget);
>   var
> update_rect: tGdkRectangle;
>   begin
> update_rect.x:=0;
> update_rect.y:=0;
> update_rect.width:=w^.allocation.width;
> update_rect.height:=w^.allocation.height;
> gtk_widget_draw(w, @update_rect);
>   end;

More information on the problem:

The color update is not drawn until the window is forced to redraw!

A testing program written in C to be sure it's not a fault of the pascal
binding teached me that.

Now I'll try a forced resize and hope to get no flickering.

Marc



___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]RE: force redraw on hscale

2004-04-27 Thread Marc Santhoff
Am Di, den 27.04.2004 schrieb Marc Santhoff um 19:06:
[...]
> 
> More information on the problem:
> 
> The color update is not drawn until the window is forced to redraw!
> 
> A testing program written in C to be sure it's not a fault of the pascal
> binding teached me that.
> 
> Now I'll try a forced resize and hope to get no flickering.

I'm really, really sad to write this:

It was the theme engine. Although apparently unistalled a library and
activated definition im my .gtkrc were still there.

This was very stupid, sorry.

Marc



___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal]HashTables in fpc ?

2004-04-27 Thread vkrish
Hi all,

Is there a hash table implementation in fcl ?

I need a good string->string hash table.

thx in advance,
=Krishna


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal