A tkMessageBox question!

Greg McFarlane gregm at iname.com
Thu Apr 20 11:25:47 EDT 2000


Instead of using the built-in Tk dialogs you may like to try the Pmw
dialoges.  All options of all component widgets can be fully
configured.  For example:
    dialog = Pmw.MessageDialog(
	title = 'Simple message dialog',
	message_font = 'Times 12',
	defaultbutton = 0,
	message_text = 'A simple message dialog\nwith no callback.'
    )

The 'message_font' component option accesses the 'font' option of the
'message' component (which is a Tkinter.Label widget), so you can
reconfigure to your heart's content.

Pmw home page: http://www.dscpl.com.au/pmw/
    

On 19 Apr, Sylvie Bruneau wrote:
> Hi Everybody.
> 
>     I am using Python for an inhouse tool that runs on irix and WinNT.  I needed to
> popup some message dialogs so I used the dialogs provided by Tkinter, ie, the
> tkMessageBox.  On irix, the appearance of the dialogs are really ugly since the font
> is 'Times 18'.  I want to change the font of the dialogs but I can't find how I can
> do it !
> 
>     I look at the available options for the tkMessageBox at
> http://w1.132.telia.com/~u13208596/tkintrobook/standard-dialogs.htm.  None of them
> let me change the font.   Then I looked in the code of tkMessageBox.py to find that
> the dialogs are completely done in Tcl/Tk and the 'Times 18' is hardcoded in a file
> called msgbox.tcl.
> 
>     How can I change this font ?  Thank you for you help !
> 
> Sly
> 
> --
> /=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/=-/
> Sylvie Bruneau ( sylvieb at icestormfx.com ) Tel: (514) 527-3963
> Software Developer, IceStorm Digital.     Fax: (514) 527-5165
> 2595 Place Chasse, Montreal, Quebec, H1Y 2C3.
> 
> La vie est un cadeau parfois difficile a deballer. (P. Brassard)
> 
> 

-- 
Greg McFarlane     INMS Telstra Australia     gregm at iname.com




More information about the Python-list mailing list