Re: GtkCombo vs GtkComboBoxEntry: scrollbars
- From: muppet <scott asofyet org>
- To: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Re: GtkCombo vs GtkComboBoxEntry: scrollbars
- Date: Mon, 23 Aug 2004 22:48:09 -0400
On Aug 23, 2004, at 6:46 PM, Daniel Kasak wrote:
This is probably a Gtk issue more than a Gtk-Perl issue, but still ...
does anyone know if I can get a scrollbar ( easily ) on my
ComboBoxEntry widgets?
you can set the style property GtkComboBox::appears-as-list, but that
doesn't work quite right in gtk+ 2.4.x... the popup window doesn't
have a scrolledwindow in it, so when the list is long, it's unusable.
there's gtk+ bug logged about this:
http://bugzilla.gnome.org/show_bug.cgi?id=135543
gtk+ shows more recent activity on this than bugzilla:
http://cvs.gnome.org/viewcvs/gtk%2B/gtk/gtkcombobox.c?
rev=1.102&view=markup
if you build gtk+ out of cvs (e.g. with jhbuild) then this code works:
use strict;
use Gtk2 -init;
my $window = Gtk2::Window->new;
my $model = Gtk2::ListStore->new ('Glib::String');
foreach (0..50) {
$model->set ($model->append, 0, "thing $_");
}
my $cb = Gtk2::ComboBoxEntry->new ($model, 0);
$cb->set_name ('little-jerry-seinfeld');
Gtk2::Rc->parse_string ('
style "my-style" { GtkComboBox::appears-as-list = 1 }
widget "*.little-jerry-seinfeld" style "my-style"
');
$window->add ($cb);
$window->show_all;
$window->signal_connect (destroy => sub {Gtk2->main_quit});
Gtk2->main;
--
"the ternary operator makes it a bit less ugly."
-- kaffee
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]