On Friday 20 August 2004 11:36, C. K. Lester wrote:
> Irv,
>
> How does the button color change when the mouse hovers over the buttons
> in the packing.exu example code? I don't see any command in the code to
> tell it to do that.
>
> What I'm guessing is that you've changed the button color for each
> button, but not the "hover" color... is that close?! :)
GTK Widgets have a background, a foreground, and a base, each of which is an
array of 5 colors.
The color which is used depends upon the state of the control.
GTK_STATE_NORMAL
GTK_STATE_ACTIVE
GTK_STATE_PRELIGHT -- mouseover, I think.
GTK_STATE_SELECTED,
GTK_STATE_INSENSITIVE
But all controls don't actually make use of all 5 colors, and sometimes it
depends on which theme is in use, so you have to experiment a bit.
You would use it like this:
gtkSet(ctl,"Background",{GTK_STATE_PRELIGHT,#cceeff})
> P.S. I figured I'd start posting my GTK questions to this list instead
> of to EUForum. Let me know if you think I should [also] post to the
> EUForum list.
Good idea, except that only 3 of us will see them if we only use this list.
Maybe later more will sign up. Suppose we just post the initial question and
then the final answer (if there is one) to Euforum, to avoid cluttering it
with back-and-forth questions.
Irv
|