I am trying to use the invoke method of a ttk.Button, as shown at TkDocs (look at "The Command Callback"), but I keep getting this error:
AttributeError: 'NoneType' object has no attribute 'invoke'
So, I tried this in the Interactive Shell:
ActivePython 3.1.1.2 (ActiveState Software Inc.) based on
Python 3.1.1 (r311:74480,...
How do you change the font and font size in the themed button widget (ttk::button)?
ttk::button .x.buttonTEST -text "TEST" -font ??
# the -font option is not valid with ttk::button
...
I'm making a small script in python with ttk and I have a problem where a function runs where it shouldn't. The button code looks as follows:
btReload = ttk.Button(treeBottomUI, text="Reload", width=17, command=loadModelTree(treeModel))
btReload.pack(side="left")
and the function is as this:
def loadModelTree(tree):
print ("Loa...
I'm working on a project using Tkinter and Python. In order to have native theming and to take advantage of the new widgets I'm using ttk in Python 2.6. My problem is how to allow the user to scroll through the tabs in the notebook widget (a la firefox). Plus, I need a part in the right edge of the tabs for a close button. The frame for ...
How do you create your status line at the bottom of your window? An inactive entry does not look very nice. What other options are there?
Is possible to integrate a progress bar which is visible only on demand?
(I am using tk and ttk from within R.)
EDIT: Now here is my second version, which works fine for me, but I would like to disp...
I'm creating a GUI using Tkinter/ttk in Python 2.7, and I'm having an issue where a Frame will resize itself once a widget is placed inside of it. I am new to Python and haven't used Tkinter before.
example:
ROOT = Tk()
FRAME = ttk.Frame(ROOT, width=300, height=300, relief='groove')
FRAME.grid()
ROOT.mainloop()
will produce a groo...
Python 2.7 (32-bit) Windows: We're experimenting with Python 2.7's support for themed Tkinter (ttk) for simple GUI's and have come away very impressed!! The one area where the new theme support seems to have come up short is how OS specific common dialogs are wrapped.
Corrected: In other words, the MessageBox and ColorChooser common dia...
Python 2.7 under Windows: How can we control the position of Tkinter's common dialogs?
Here's what we've discovered:
Certain common dialogs always open up relative to their parent window
Certain common dialogs always open up centered on the user's desktop
All common dialogs appear to ignore the optional parent= parameter
Questions:
...
I'm experimenting with the new ttk Tile enhancements that ship with Python 2.7.
Windows 7: The code below demonstrates how the combobox dropdown shows up BEHIND our root window when the root window is configured as a topmost window ("always on top"). If you comment out the line """ root.attributes( '-topmost', 1 )""" then the combob...
Is it possible to create a multi-line label with word wrap that resizes in sync with the width of its parent? In other words the wordwrap behavior of Notepad as you change the width of the NotePad window.
The use case is a dialog that needs to present a block of multi-line text (instructions) in its entirety without having the text clip...
Is it possible to configure tkinter or ttk widgets (Label, Entry, Text) with a transparent background so that they can be placed in containers with custom background colors or on top of canvas graphics or images?
I'm also looking for a way to change the background color of a ttk Frame widget?
Do I need to use the new ttk Style objects ...
I'm experimenting with Python 2.7's new Tkinter Tile support (ttk). Is there a way to make the ttk.Progressbar() control auto-resize in proportion to its parent container? In reading the documentation on this control, it appears that one must explicitly set this widget's height or width?
I'm looking for a way to place the ttk.Progressba...
Curious if there are any higher level frameworks that attempt to wrap Tkinter? For example, wxPython is wrapped by the Dabo framework (http://dabodev.com/) and PythonCard.
Motivation: We've recently moved to Python 2.7 (Windows) and are very impressed with the new ttk (Tile) support which allows one to build professional quality, platfo...