Tkinter (mis)behaviour ?

Henry Baumgartl h.baumgartl at chello.NOSPAM.nl
Fri Aug 30 10:06:05 CEST 2002


Hello All,

When I use the following on my W2K - Python 2.2.1 box:

>>>self.cb3 = Checkbutton(self.selfrm, text=_("text"),
variable=self.txtsave)

it works fine. When selected, the selector shows a checkmark.

On my Mandrake Linux 8.0 - Python 2.2.1 box, you need a magnifying glass to
see if the button is selected or not. Changing it to

>>>self.cb2 = Checkbutton(self.selfrm, selectcolor="#FF0000", text=_("On DKN
server"), variable=self.dknsave)

solves the problem on Linux (actually thought red was the standard
setting??). But, now I have a permanently red selector on W2K, on top of
which a checkmark appears when selected.

A comparable, I think, issue is that when I bind to a specific Text widget
like:

>>>self.textfield.bind('<Control-a>', self.onSelectAll)

on W2K, the event is caught, but, the actual behaviour is not my method, but
the IDLE behaviour of going to the beginning of the line.

Changing it to conform to the tkinter / IDLE way, like:

>>>self.textfield.bind('<Alt-a>', self.onSelectAll)

works. But gives me the feeling I have lost control somewhere along the way.
(although, I must admit to frequently having used the fact that on W2K
actions like copying, cutting, pasting, etc. just work on Text widgets,
without having to write a line of code.)

Now I need modules that simply work the same on Windows, Linux and more.
And, I keep running into this kind of inconsistencies.

Could anyone help me out here?

Best Regards,
Henry

Please, remove NOSPAM. from my address when responding directly to me.





More information about the Python-list mailing list