Re: [Fwd: Re: Gtk2::MenuItem get_label?]



On Mon, 2005-04-18 at 20:17 +0200, Martin Junius wrote:
Grant McLean wrote:

I notice the OptionMenu widget is on the 'Deprecated' tab in Glade.  Is
there a reason you need to use this widget in particular?

Just ;-) noticed this too. I'm using OptionMenu because I want a 
pulldown menu in a data entry panel.

You could just use a MenuBar with only one top-level like my test script
did.  There's no law that says a menu 'bar' has to go across the top of
the app window.

Looking at the Glade widgets, ComboBox seems to be the successor? But 
this involves all the great ;-) MVC stuff ...

You're not going to get far with Gtk2 if you're afraid of the MVC
stuff :-)  The ComboBox is actually very easy to use from Glade, but if
you need any kind of toggle menu item then I don't think it will cut it.
If you don't need toggle menu items then I've completely misunderstood
your original problem.

I've attached a test script that uses the MenuBar widget and seems to
work.  Does it achieve the kind of effect you're after?

Doesn't run, looks like my Perl doesn't have Class::Accessor::Fast on board:

Well it's a handy module (in the Class-Accessor distribution on CPAN)
but it's trivial to change the script not to use it - just replace
$self->gui with $self->{gui}.

Cheers
Grant




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]