Re: Scrolled menu
Paul Allen <[email protected]> Wed, 22 Apr 2009 10:35:29 -0700
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2009-04-22 at 01:16 -0700, Duncan Ferguson wrote:
> Hiya list,
>
> In my perl-Tk app I have a generated menu and on occasion it is long
> enough to go off the bottom of the screen so you cannot see the last
> few items. I have tried to add a scroll to the menu but my attempts
> so far have been unsuccessful. Is it possible to have a scrolled
> menu, and if so are there any hints anywhere on how to do it?
>
> I tried doing
>
> $menus{hosts} = $menus{bar}->Scrolled('cascade',
> -scrollbars => 'e',
> -label => 'Hosts',
> -tearoff => 1,
> -menuitems => [
> ......
>
> but I just get an error:
> Failed to AUTOLOAD 'Tk::Frame::cascade' ....
My Tk books are at home, but isn't the first argument of Scrolled()
the class of the thing you want to be scrolled? Perhaps Scrolled()
cannot be applied to a Menu, and perhaps someone here can say so
authoritatively. But in the mean time, try passing 'Menu' as the
first argument to Scrolled() and see what happens. It might be
exciting. :-)
Paul Allen
--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/ptk