473,388 Members | 1,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 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:
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 1295

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: srijit | last post by:
Hello, Any idea - why the following code crashes on my Win 98 machine with Python 2.3? Everytime I run this code, I have to reboot my machine. I also have Win32all-157 installed. from Tkinter...
2
by: Adonis | last post by:
I am creating some widgets by inheriting from Tkinter.Frame and populating the frame with whatever the widget will be then creating certain attributes/methods to be accessed later. My question is,...
25
by: BJörn Lindqvist | last post by:
See: http://www.wxpython.org/quotes.php. especially: "wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard...
5
by: H J van Rooyen | last post by:
Hi, I am struggling to get the pack method to do what I intend. I am trying to display user input in a seperate window, along with a little description of the field, something like this: ...
2
by: Ben Finney | last post by:
Howdy all, Python programmers looking for a built-in GUI toolkit are told two things: one, Python already comes with a GUI toolkit, and two, it looks equally ugly on all platforms. This is...
44
by: bg_ie | last post by:
Hi, I'm in the process of writing some code and noticed a strange problem while doing so. I'm working with PythonWin 210 built for Python 2.5. I noticed the problem for the last py file...
4
by: MartinRinehart | last post by:
Everything I've read about Tkinter says you create your window and then call its mainloop() method. But that's not really true. This is enough to launch a default window from the console: ...
3
by: J-Burns | last post by:
Hello. Im a bit new to using Tkinter and im not a real pro in programming itself... :P. Need some help here. Problem 1: How do I make something appear on 2 separate windows using Tkinter? By...
0
by: dudeja.rajat | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.