471,889 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,889 software developers and data experts.

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:

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,
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.

Aug 25 '08 #1
0 1223

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
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.