On Thursday 17 February 2005 17:36, Wendell Turner wrote:
> I can change the color of a button during program operations
> with
>
> b.set_attribs("fg=black", "bg=green" )
> b.finally()
> b.init()
>
> which works fine. However, when I try to change the text with
>
> b.set_attribs("label=foo")
> b.finally()
> b.init()
>
> the name on the windows color bar changes (fedora core linux +
> fvwm), not that of the button text. Is this the correct
> behavior?
>
> Wendell
Ah, I think you want the attrib() method, rather than the set_attribs()
method; the latter just understands the Icon graphics attributes of the
component's cloned windows, whereas attrib() also handles attributes that
have nothing to do with the cloned windows (such as the button's label).
Unfortunately in this case the attribute "label" has two meanings; the
buttons's label and also the Icon graphics attribute which is the string
shown in the title bar.
By the way, there is a method set_label which can be used to conveniently
change the button's label dynamically.
Hope this helps,
Robert
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group