Muti-column menu

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Muti-column menu

Bugzilla from Vasilis.Vlachoudis@cern.ch
Hi All,

in my application I have a submenu (appearing both on the menu bar and with right-click) that contains many entries ~30. But it has to be in one submenu since they are various types of geometrical bodies to insert.
Is there a way to create a multi-column sub-menu in Tkinter?

Thanks in advance
Vasilis

_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Muti-column menu

Michael Lange
Hi Vasilis,

Thus spoketh Vasilis Vlachoudis <[hidden email]>
unto us on Wed, 2 Nov 2011 20:51:43 +0000:

> Hi All,
>
> in my application I have a submenu (appearing both on the menu bar and
> with right-click) that contains many entries ~30. But it has to be in
> one submenu since they are various types of geometrical bodies to
> insert. Is there a way to create a multi-column sub-menu in Tkinter?
>

Yes, all you need to do is

    menu.entryconfigure(i, columnbreak=1)

where i is the index number of the menu item that will appear at the top
of a new column.

Best regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

No one can guarantee the actions of another.
                -- Spock, "Day of the Dove", stardate unknown
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Muti-column menu

Bugzilla from Vasilis.Vlachoudis@cern.ch
Thank you very much.
Exactly what I was looking for.
Vasilis

________________________________________
From: tkinter-discuss-bounces+vasilis.vlachoudis=[hidden email] [tkinter-discuss-bounces+vasilis.vlachoudis=[hidden email]] on behalf of Michael Lange [[hidden email]]
Sent: 03 November 2011 11:36
To: [hidden email]
Subject: Re: [Tkinter-discuss] Muti-column menu

Hi Vasilis,

Thus spoketh Vasilis Vlachoudis <[hidden email]>
unto us on Wed, 2 Nov 2011 20:51:43 +0000:

> Hi All,
>
> in my application I have a submenu (appearing both on the menu bar and
> with right-click) that contains many entries ~30. But it has to be in
> one submenu since they are various types of geometrical bodies to
> insert. Is there a way to create a multi-column sub-menu in Tkinter?
>

Yes, all you need to do is

    menu.entryconfigure(i, columnbreak=1)

where i is the index number of the menu item that will appear at the top
of a new column.

Best regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

No one can guarantee the actions of another.
                -- Spock, "Day of the Dove", stardate unknown
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss