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



Hi!

thanks for your response
so in fact, the purpose is to verify before opening ( = and creating/ appending) a page in the notebook that a same page is not already open. for instance, you have a list of bills, and when you double-click on one of them it appends a new notebook page. but actually, if we double clic 3 times on the same bill, it will open 3 new pages that are exactly the same ones! my wish is when we try to open a page that already exists, this existing page becomes the current one (with set_current_page). my problem is:
- is the bill the user double-cliked already open?
- if yes, set it as the current one, else create it

the second point is not my main problem, this is the first point that troubles me!

best regards,
cedric



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




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