Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Limitations with Tkx configure options?

by Anonymous Monk
on Sep 10, 2012 at 18:48 UTC ( [id://992823]=note: print w/replies, xml ) Need Help??


in reply to Re: Limitations with Tkx configure options?
in thread Limitations with Tkx configure options?

This is just a guess from my Tk experience, but some widgets use -bg instead of -background.

Some widgets yes, but not ttk::button

A "tk::button" aka a button does take both -bg and -background

ttk widgets, themed tk widgets, manipulate that stuff through -style , kinda like css

see http://www.tcl.tk/man/tcl/TkCmd/ttk_intro.htm, http://www.tkdocs.com/tutorial/styles.html

  • Comment on Re^2: Limitations with Tkx configure options?

Replies are listed 'Best First'.
Re^3: Limitations with Tkx configure options?
by murrayn (Sexton) on Sep 11, 2012 at 01:52 UTC
    Thank you. I would seem to be constrained by the settings of the style sheet associated with the widget (and I'm not so desperate for specific colours that I'm going to go revising the style sheet just for fun - there's a job to be done behind all this :) ).
    Those links were very helpful and led to an interesting discovery which appears to differ between ttk and Tk:
    A widget state of active != !disabled. At least not when the Tbutton style applies. I wanted to disable and enable a button during various processes but setting the button's state to "active" did not re-enable it.
    $w->state('!disabled') reverses the effect of $w->state('disabled')
    $w->state('active disabled') is not an oxymoron but it makes the button rather difficult to press while both states exist.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://992823]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found