|
From: Sori S. <sx...@ya...> - 2005-09-26 01:48:57
|
Didn't realised that Tile is a replacement for Tk, but
now is clear. I need one more piece of advice though:
I am comming from Python, and am trying to manipulate
the widgets with Python syntax, and, maybe, a few Tk
calls.
For instance:
from Tkinter import *
r=Tk()
bt=Button(r,text='Something') # that's a Tk button
# here is the proof:
bt.keys()
['activebackground', 'activeforeground', 'anchor',
'background', 'bd', 'bg', 'bitmap', 'borderwidth',
'command', 'compound', 'cursor', 'default',
'disabledforeground', 'fg', 'font', 'foreground',
'height', 'highlightbackground', 'highlightcolor',
'highlightthickness', 'image', 'justify',
'overrelief', 'padx', 'pady', 'relief', 'repeatdelay',
'repeatinterval', 'state', 'takefocus', 'text',
'textvariable', 'underline', 'width', 'wraplength']
# loading the Tile environment:
r.tk.call('package','require','tile')
r.tk.call('namespace','import','-force','ttk::*')
r.tk.call('tile::setTheme','blue')
bt2=Button(r,text='Something blue') # that's a Tile
button
# here is the proof:
bt2.keys()
['activebackground', 'activeforeground', 'anchor',
'background', 'bd', 'bg', 'bitmap', 'borderwidth',
'disabledforeground', 'fg', 'font', 'foreground',
'height', 'highlightbackground', 'highlightcolor',
'highlightthickness', 'justify', 'overrelief', 'padx',
'pady', 'relief', 'repeatdelay', 'repeatinterval',
'wraplength', 'takefocus', 'command', 'default',
'text', 'textvariable', 'underline', 'width', 'image',
'compound', 'padding', 'state', 'takefocus', 'cursor',
'style', 'class']
# bt2 has style and class ;-) and padding
# let's manipulate the look of bt2:
bt2.grid() # place it on the screen
bt2.tk.call('style','map','-background {active
#0000ff}') # to make it green
Nothing happens on the screen. Any hint how should I
proceed?
Thanks agains,
Sorin Schwimmer
--- Joe English <jen...@fl...> wrote:
>
> In most cases, the Tile widgets are actually much
> more
> customizable than their core counterparts -- just
> not
> through widget options.
>
> As a rule of thumb, tile widgets only include the
> "essential"
> options relating to the function of the widget,
> while everything
> appearance-related is handled by the style.
> (Deciding which
> options are "essential" and which aren't generally
> comes down
> to a judgment call -- my tendency has been to leave
> options
> out when in doubt.)
>
> But each widget has a '-style' option that can be
> used to select
> a custom style, by which nearly every aspect of the
> appearance
> can be specified. The process of defining custom
> styles isn't
> very well documented, but the Tcl'2004 presentation
> on Tile
> is a good place to start:
>
> <URL:
> http://tktable.sourceforge.net/tile/tile-tcl2004.pdf
> >
>
>
> --Joe English
>
> jen...@fl...
>
>
>
-------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's
> Geronimo App Server.
> Download it for free - -and be entered to win a 42"
> plasma tv or your very
> own Sony(tm)PSP. Click here to play:
> http://sourceforge.net/geronimo.php
> _______________________________________________
> Tktable-tile-dev mailing list
> Tkt...@li...
>
https://lists.sourceforge.net/lists/listinfo/tktable-tile-dev
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
|