Hi! I know this seems to be a gtk issue, but I'm using pascal so:
Talking of GTK+ 1.2 I'm trying to chnge the background color on a hscale. There seems to be some sort of bug or misunderstanding by me. The actual change in color happens delayed on a hscale I'm using and switching color on. If the color is changed programmatically, nothing is drawn changed. After the next change in value at the gui, the background is changing from grey to green (SPEED_COLOR_ACTIVE) exactly at the position the slider has been at (it is going in increments of 17). My question: how can I force a redraw on selected widgets or the whole window when needed? TIA, Marc P.S.: some code: var st : pGtkRcStyle; cola, colp : TGdkColor; begin ... { swap the visual focus } gdk_color_parse(SPEED_COLOR_ACTIVE, @cola); gdk_color_parse(SPEED_COLOR_PASSIVE, @colp); st := gtk_rc_style_new (); if (target = 1) then begin gtk_widget_grab_focus(GTK_WIDGET(scales[1])); st^.bg[GTK_STATE_ACTIVE] := colp; st^.color_flags[GTK_STATE_ACTIVE] := st^.color_flags[GTK_STATE_ACTIVE] OR GTK_RC_BG; gtk_widget_modify_style(GTK_WIDGET(scales[0]), st); //gdk_flush(); no use ... _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal