469,270 Members | 1,026 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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_set().
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 1587
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_set(). 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 discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.