YMohan wrote:
Hi All,

I am using MAC OS 10.5.1 and Python 2.5.1. I want to show the defalut
selected button in Tk window. I have two buttons OK and CANCEL. I want to
show the by default OK Button selected but I am not able to do the same on
MAC environment. The same code works in Windows. I have tried to set the
background color of button but no success. Please refer the attached images.
First image is MAC window and second one is Window's window.

Can anybody tell me what I am doing wrong in below code or how to set the
default selected button? I have written the following code -


On the Mac, Tk buttons ignore the -bg and -fg flags.

The way to specify the default button would be something like this:

btn.configure(bg = "blue", fg = "red", default=ACTIVE)

That shows the Mac Tk button with focus/selected state. This should work on Windows, as well--there's no need to specify -fg and -bg colors to indicate default status.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to