Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to wrap Tk menu with many items

Status
Not open for further replies.

minkie

Technical User
Oct 7, 2002
8
0
0
GB
I have a script that generates a wish/Tk menu.

Some of the menus have many items and they drop off the bottom of the screen.

Is there any way to get the menu to wrap to a second column?

Thanks,
Mike.

example code:

menu .live.sybase.server1 -tearoff 0
foreach account { a b c d e f g h i j k l m n o p q r s }
{ .live.sybase.server1 add command -label $account -command "connect-x live server1 $account" }
 
I think you are after -columnbreak.
From the menu page of the Tk manual:
pathName add type ?option value option value ...?
Add a new entry to the bottom of the menu. The new entry's type is given by type and must be one of cascade, checkbutton, command, radiobutton, or separator, or a unique abbreviation of one of the above. If additional arguments are present, they specify any of the following options:
-columnbreak value
When this option is zero, the appears below the previous entry. When this option is one, the menu appears at the top of a new column in the menu.

HTH

ulis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top