469,609 Members | 1,230 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

Re: Tkinter - How to create combo box using Tix with the existingTkinter widgets/

On Mon, Aug 25, 2008 at 12:57 PM, <du**********@gmail.comwrote:
Hi,

I'm using Tkinter module to create a GUI application. I found that the
combo box is not present in Tkinter module.
It comes with Tix module. Could some one give me an example to create
a combo box whilst using Tix and Tkinter?

I've been using the following to create my tkinter widgets:
myRoot = Tk()

and in my Gui code, I've been using
self.lbAnalysisLib = Listbox(master, \
yscrollcommand = self.vsbAnalysisLib.set,\
height = 1,
width = 30)

Please suggest how could I call the Tix's combo box from my existing
GUI application that heavily uses the Tkinter widgets?
Kindly provide me some code examples.

Thanks and regards,
Rajat
Ok...now I found the way to do that. But I'm stuck further.
my code is as below:
main module
**********************
myRoot = Tix.Tk()
myAppGUIObject = myAppGUI(myRoot)

Gui module
****************
class myAppGUI:
def __init__(self, master):

self.cbAnalysisLib = Tix.ComboBox(master, label = "Analysis Library:")
self.cbAnalysisLib.grid(row = 3, column = 1, padx = 30, pady = 30,
sticky = W)
self.cbAnalysisLib.config(editable = 0)

self.cbAnalysisLibVersion = Tix.ComboBox(master, label = "Reference
Analysis Library Version:", \

labelside = 'left')
self.cbAnalysisLibVersion.grid(row = 5, column = 1, padx = 30, pady
= 30, sticky = W)
self.cbAnalysisLibVersion.config(editable = 0)
The problem is that the labelside option is not working. I'm not able
to use even the wraptext option.

--
Regrads,
Rajat
Aug 25 '08 #1
0 1139

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by srijit | last post: by
2 posts views Thread by Adonis | last post: by
25 posts views Thread by BJörn Lindqvist | last post: by
5 posts views Thread by H J van Rooyen | last post: by
2 posts views Thread by Ben Finney | last post: by
44 posts views Thread by bg_ie | last post: by
4 posts views Thread by MartinRinehart | last post: by
3 posts views Thread by J-Burns | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.