Re: [gtkmm] pb when checking notebook pages ...



On Tue, 2004-08-24 at 17:00, cedric wrote:

> 
> so my goal is to access to "label". i used get_tab_label and others 
> things by i never successed :-[
> 
( (NoteBookLabel *) get_tab_label( some_child_widget ) ) -> label
this should give you access to your label (maybe you need to make it
public or use an accessor function, but you get the idea )

But i'm not sure if this is the way to do this. I see you keep a pointer
to the child widget in your NoteBookLabel, why is that?
(Formularies *form_ptr; //the widget that is the "body" of the notebook
page)

I've build this kind of labels before (he, we all did) and never used a
special class for them. Just put the button and the label in an hbox en
add it to the labelspace. Maybe a function would be more appropiate? (
Gtk::HBox Get_Label_Widget( const Glib::ustring & label_text ) ....

this way you can set your labels bij doing:
append_page( child_widget,  Get_Label_Widget( "blabla" ) ) ;

Anyway, i hope this will help you a bit. :)

Bart

> PS : I saw you come from Belgium , so , DO YOU SPEAK FRENCH ? ;o)
Actually, i'm from Holland ;-) just claimed an .be domain since .nl,
.com, etc.. was taken.

> 
> 
> 
> B.Hakvoort a écrit :
> 
> >hmmz, after rereading your mail i think i misunderstood you.
> >Sorry for that ;-)
> >
> >Bart
> >
> >On Mon, 2004-08-23 at 17:42, B.Hakvoort wrote:
> >  
> >
> >>Hi Cedric,
> >>
> >>Why don't you use signal_switch_page()? this way your callback is only
> >>called when someone switched to another page.
> >>
> >>Maybe this is what you're looking for?
> >>
> >>Bart
> >>
> >>On Mon, 2004-08-23 at 17:37, cedric wrote:
> >>    
> >>
> >>>Hello!
> >>>
> >>>I ve a question about Gtk::NotebookS :
> >>>i have created a Notebook in which the tabs (the things to click on to go to a given page of the Notebook) are instances 
> >>>of my NoteBookLabel class (it s a HBox): i ve made this to have a little cross in the tab to close the corresponding notebook page. 
> >>>it works fine.
> >>>now i would like to check the open pages before opening a new one, to avoid to open several times the same page. 
> >>>in my opinion, the only way available to know it is to check the notebook's labels and look if they have the same one that the page that 
> >>>we want to open (maybe there are others way of comparison?). if the page is already open, i would like this page to be the current one. 
> >>>i would like to avoid managing a list of all the open pages because it would be a bit VERY fastidious...
> >>>so i ve tried to use the get_tab_label and get_tab_label_text methods without any success, 
> >>>since i didn t managed to access to the Gtk::Label of my NoteBookLabel class (i guess it s normal). 
> >>>The Notebbok's method return *Gtk::Widget that i don t manage to turn in my classe's type (NoteBookLabel).
> >>>So for now i really don t know how to do to verify if a page is already open or not! 
> >>>Maybe (and surely) i m not using the good way but i don t see any other :-[
> >>>
> >>>thanks for your help!
> >>>best regards,
> >>>cedric
> >>>
> >>>_______________________________________________
> >>>gtkmm-list mailing list
> >>>gtkmm-list gnome org
> >>>http://mail.gnome.org/mailman/listinfo/gtkmm-list
> >>>      
> >>>
-- 
www.titanium-it.nl --- Open Minded Open Source
www.real-life.nl <-----Another Source




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