Gtk3 combos
- From: Daniel Kasak <d j kasak dk gmail com>
- To: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Gtk3 combos
- Date: Wed, 30 Apr 2014 16:16:31 +1000
More migration questions ...
A simple example of inserting 2 key/value pairs into a combo, and setting the text column to the 2nd ( Glib::String ) column as the 'display' column used to be:
my $model = Gtk2::ListStore->new( "Glib::Int", "Glib::String" );
$model->set(
$model->append
, 0, 100
, 1, "Netezza"
);
$model->set(
$model->append
, 0, 200
, 1, "Teradata"
);
my $widget = $self->{builder}->get_object( "CONFIG.TARGET_DB_TYPE" );
$widget->set_model( $model );
$widget->set_text_column( 1 );
How would you do this in Gtk3? If I change the Gtk2 to Gtk3, and rename set_text_column to set_entry_text_column, I get *nothing*. If I add another column to the ListStore ( so we'd have ID, short_text, long_text ), I get the long_text values showing up. So I assume there is something else I'm supposed to be passing to $model->set? Or am I way off?
Dan
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]