Re: get_tab_label



As get_tab_label() returns a Gtk::Label you just need to add a get()
to that to get the text in the label. i.e.

  my $a = $notebook->get_tab_label($vscrolled)->get;

AvA <a v a home nl> writes:

hi all,

i am struggling with the notebook widget for a simple text editor.
i want to get the name of the current open notebook page.

i have the following structure in the notebookpage:
notebook->vscrolledwindow->text.

when i do this:

my $file_dialog = new Gtk::FileSelection("Save as...");
my $a = $notebook->get_tab_label($vscrolled);
$file_dialog->set_filename($a);
......

then i get the following from $a:

Gtk::Label=HASH(0x8196bdc)

how do i work around it so it just gives me the labelname...in this
case:
new.txt.

thanks


_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list




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