473,769 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

osx tkinter listbox problem

I am using Darwin 10.4.9, tcl 8.4.7, tk 8.4, and python 2.3.5. I have
also tried Python 2.5 on Darwin, Debian, and Fedora Core 6.

I am working on a GUI front-end to a Python program of mine. It is a
simple grid with labels in the left column and input widgets in the
right column. One of the rows has a listbox in the right column. The
listbox contains two items. I select one using widget.select_s et().
The GUI is not complete yet, because I am still learning about Python
and Tkinter.

On Linux, the GUI works as expected. On OSX, when select_set() runs,
the listbox disappears from its place in the grid, and appears in the
upper left corner of the window. Here are screen shots to illustrate.
http://terrorpin.net/~ben/docs/alt/m...sfi-debian.jpg
http://terrorpin.net/~ben/docs/alt/m.../pysfi-osx.png

The GUI code itself is at the following location.
http://terrorpin.net/~ben/docs/alt/m...f-wip/pysfi.py

To run, it needs the Python program at the following location.
http://terrorpin.net/~ben/docs/alt/m...sf-wip/pysf.py

Why does the listbox change position at all? Am I using listbox
incorrectly?

Thank you,

Ben
Mar 26 '07 #1
2 1760
Ben Collver wrote:
I am using Darwin 10.4.9, tcl 8.4.7, tk 8.4, and python 2.3.5. I have
also tried Python 2.5 on Darwin, Debian, and Fedora Core 6.

I am working on a GUI front-end to a Python program of mine. It is a
simple grid with labels in the left column and input widgets in the
right column. One of the rows has a listbox in the right column. The
listbox contains two items. I select one using widget.select_s et(). The
GUI is not complete yet, because I am still learning about Python and
Tkinter.

On Linux, the GUI works as expected. On OSX, when select_set() runs,
the listbox disappears from its place in the grid, and appears in the
upper left corner of the window. Here are screen shots to illustrate.
http://terrorpin.net/~ben/docs/alt/m...sfi-debian.jpg

http://terrorpin.net/~ben/docs/alt/m.../pysfi-osx.png

The GUI code itself is at the following location.
http://terrorpin.net/~ben/docs/alt/m...f-wip/pysfi.py

To run, it needs the Python program at the following location.
http://terrorpin.net/~ben/docs/alt/m...sf-wip/pysf.py

Why does the listbox change position at all? Am I using listbox
incorrectly?

Thank you,

Ben

I think you couldn't be using Listbox more correctly.

It looks like Tk aqua is broke here--which is not unusual because its
still evolving. Perhaps you could file a bug report?

A "cross platform" work-around might be to grid a frame at the row and
column of self.Main and pack the Listbox into the Frame. I don't have a
Mac at work to test this, however. But I would be curious to know your
results if you try it.

James
Mar 26 '07 #2
James Stroud wrote:
A "cross platform" work-around might be to grid a frame at the row and
column of self.Main and pack the Listbox into the Frame. I don't have a
Mac at work to test this, however. But I would be curious to know your
results if you try it.
Thank you for the sub-frame suggestion. I tried, but it didn't help.

Ben
Mar 27 '07 #3

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

Similar topics

2
5829
by: Jørgen Hansen | last post by:
Hi I have a problem with a Listbox in Tkinter. When I tab through several widgets with the tab-key, the listbox looses its selection, even though it has been selected with .selection_set. The example below demonstrates this. Can anyone provide me with some help on this? Regards Jorgen
4
5336
by: Patrick L. Nolan | last post by:
Our Tkinter application has a big ScrolledText widget which is a log of everything that happens. In order to prevent people from making changes, we have it in DISABLED mode except when the program wants to write a new entry. This works OK, except that sometimes we want to copy out of piece of the contents and paste it in another window. When it's DISABLED, it appears that we can't even select a portion of the text. Is this an...
2
5138
by: Zhang Le | last post by:
Hello, Is there a quick way to replace the content of a single item in tkinter's listbox? Currently my solution is to first delete the item, then insert a new item at the same position. I think there may be better way. Zhang Le
2
11570
by: Harlin Seritt | last post by:
Whenever I set up something similar: vals = for v in vals: listbox.inset(END, v) I notice that when this listbox is displayed, there is never a default value. How can I make sure that one of the indices is selected by default?
0
1425
by: Svenn Bjerkem | last post by:
Hi, Armed with Programming Python 3rd Edition and Learning Python 2nd edition I try to write an application which I at first thought was simple, at least until I was finished with the GUI and then wanted to start putting some data into it. As you will see, the program is not yet finished but I post what I have so far.
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7409
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3562
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.