Page numbers in GtkNotebook



Hi,

How does one find out the page numbers of tabs in GtkNotebook?
I tried gtk_notebook_get_current_page() in a callback for
switch page signal, but the page number I get from this varies
each time.

I want to be able to do something like this in my code:
    
-------------------------------------------------------------
#define PAGE_0  0
#define PAGE_1  1
#define PAGE_2  2
...

on_top_switch_page (GtkNotebook* notebook, ....)
{
    curr_page = gtk_notebook_get_current_page(notebook);

    switch (curr_page) {
        case PAGE_0:
            break;
        case PAGE_1:
            break;
            ....
    }
}
-------------------------------------------------------------

I found this question asked in the archives (2000-Jul), but
I couldn't locate any suitable answers.

Can anyone please help? It's rather urgent.

Thanks,
Manu




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