Setting Gadget background

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
Setting Gadget background

Submitted by gates on Thu, 09/25/2003 - 20:04.

We have an app that sometimes needs to change the background colors of all Widgets (and Gadgets) in the GUI. I wrote a function that does this using XtVaGetValues. It is a recursive function that starts with a given Widget and works down the hierarchy of children. Anyway, when it comes to CascadeButtonGadgets, it doesn`t seem to work and they show up the wrong color. Do I need to set the background of a Gadget in a special way? By the way, it works for PushButtonGadgets. Thanks.

Fri, 09/26/2003 - 11:18#1

Fri, 09/26/2003 - 11:18#1

Anonymous

Setting Gadget background

Gadgets don`t have their own window, so foreground and background colours (among other things) are taken from the parent.

 

 

 

Wed, 10/01/2003 - 11:10#2

Anonymous

Setting Gadget background

You might also want to consider using XmChangeColor() instead of setting XmNbackground resources directly. XmChangeColor() also changes the foreground and shadow colors to ones appropriate for the background color you provide.

  •