473,320 Members | 1,535 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,320 software developers and data experts.

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 1736
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
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...
4
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...
2
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...
2
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...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.