osx tkinter listbox problem

B

Ben Collver

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/music/soundfont/pysf-wip/pysfi-debian.jpg
http://terrorpin.net/~ben/docs/alt/music/soundfont/pysf-wip/pysfi-osx.png

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

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

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

Thank you,

Ben
 
J

James Stroud

Ben said:
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/music/soundfont/pysf-wip/pysfi-debian.jpg

http://terrorpin.net/~ben/docs/alt/music/soundfont/pysf-wip/pysfi-osx.png

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

To run, it needs the Python program at the following location.
http://terrorpin.net/~ben/docs/alt/music/soundfont/pysf-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
 
B

Ben Collver

James said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top