Re: Notebook widget with close page button



* Dawid Zamirski <dzrudy gmail com> [2005-02-28 17:25]:
I'm just starting with Gtk programming, and I would like to
know how to make a little close "x" button on each page of a
notebook widget (simillar to the one in gedit when working on
multiple files). Does it require to build a custom wigdet that
inherits from orginal notebook widget? Thanks

No. None of the labels on any widget are fixed strings in Gtk2;
they're always Gtk2::Label, but the container will actually
accept any widget you wish. The notebook is no different. The tab
label can be any widget you want, like, say, a HBox containing a
label and a close button.

Regards,
-- 
#Aristotle
*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;



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