Tkinter - how to right align Help Menu cascade?? 
Author Message
 Tkinter - how to right align Help Menu cascade??

This is a trivial thing, but I wan't my Help cascade right-aligned and
cannot locate any options in the Tkinter docs.

helpmenu = Tkinter.Menu( menu )
menu.add_cascade( label="Help", anchor=Tkinter.W, menu=helpmenu )
                                                    ^^^^^^^^^^^^^^^^^^^^^^

Obviously this doesn't work, but that is what I would _like_ to do.

Thanks
- Doug

  smime.p7s
2K Download


Wed, 05 Nov 2003 15:57:30 GMT  
 Tkinter - how to right align Help Menu cascade??

says...
Quote:
> This is a trivial thing, but I wan't my Help cascade right-aligned and
> cannot locate any options in the Tkinter docs.

> helpmenu = Tkinter.Menu( menu )
> menu.add_cascade( label="Help", anchor=Tkinter.W, menu=helpmenu )
>                                                     ^^^^^^^^^^^^^^^^^^^^^^

> Obviously this doesn't work, but that is what I would _like_ to do.

> Thanks
> - Doug

In the old days of Tk, when menus where actual Tk widgets, this was
definately possible, but now that Tk wraps the underlying OS widget for
menus and other things, i'm not so sure it's possible anymore. It's been
so long since the standard for the Help menu on the right side of the
menubar changed, I don't recall how I used to do it in windows either. If
it was some lead character (which I sort of dimly remember), you might
try using that as the first char of the menu label - i.e "Help" (try
"~Help" and see what happens).

You might try asking this question over on comp.lang.tcl and see what
they have to say.

Dave LeBlanc



Thu, 06 Nov 2003 01:25:03 GMT  
 Tkinter - how to right align Help Menu cascade??

Quote:

> says...
>> This is a trivial thing, but I wan't my Help cascade right-aligned and
>> cannot locate any options in the Tkinter docs.

In tk 8.0 and later, if you use toplevel.configure(menu = XXX)
to create a menu, that menu is treated in a system-dependent way.  On Unix,
this includes placing the menu with the title "help" on the right.
AFAIR, this does *not* happen on Windows.  It depends on the "system
standard" is, and how the tk folks interpreted it.

Otherwise, *don't* use -menu, but make a frame with menubuttons in it,
and pack them using the "pack" method.

Jeff



Thu, 06 Nov 2003 07:44:24 GMT  
 Tkinter - how to right align Help Menu cascade??
On Sat, 19 May 2001 23:44:24 GMT, Jeff Epler

Quote:


>> says...
>>> This is a trivial thing, but I wan't my Help cascade right-aligned and
>>> cannot locate any options in the Tkinter docs.

> In tk 8.0 and later, if you use toplevel.configure(menu = XXX)
> to create a menu, that menu is treated in a system-dependent way. [...]

The system-dependent features are discussed in the "menu" manpage,
under the heading "SPECIAL MENUS IN MENUBARS".

Jeff



Thu, 06 Nov 2003 21:29:34 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Tk8.0 : right aligned cascade menu ?

2. right-justifying menus in tkinter

3. Cascade Menu patch (Unix menus)

4. help using cascade menus.

5. Help With Cascade Menus Please

6. Dynamic menu-rights/Enable and Disable menu-items

7. help menu on right side ?

8. Ctrl+R aligns line right in workspace (german keyboard)

9. broken align right in editfield?

10. How to locate right aligned columns

11. How to right-align tree

12. Right aligning text in S87

 

 
Powered by phpBB® Forum Software