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

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?


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
-- --- Open Minded Open Source <-----Another Source

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