Problem with gtk_notebook_set_current_page()
- From: Mirco Müller <mirco pool informatik rwth-aachen de>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Problem with gtk_notebook_set_current_page()
- Date: Wed, 25 Sep 2002 03:16:06 +0200
Hello everyone!
I created a GtkNotebook with two pages (one holding a centered GtkLabel, the
other a GtkGLArea). I disabled the rendering of tabs and borders for this
GtkNotebook so the user does not notice that there is actually more "than
meets the eye" :) I want to control the displayed tab of the GtkNotebook from
within my program.
This does not work as intended. Only some calls to
gtk_notebook_set_current_page() work others don't. To cross-check things I
added keyboard-shortcuts for each tab. With the keyboard I can switch between
both tabs without any problem.
Furthermore I added some printf()s to the tab-switching like this (case 1):
if( gtk_notebook_get_current_page( my_notebook ) == 0 )
gtk_notebook_set_current_page( my_notebook, 1 );
else
printf( "loadEffect(): page 1 is already being displayed\n" );
and (case 2):
if( gtk_notebook_get_current_page( my_notebook ) == 1 )
gtk_notebook_set_current_page( my_notebook, 0 );
else
printf( "loadEffect(): page 0 is already being displayed\n" );
For some reason the message (either case) gets printed to console although
the page/tab tested for isn't really displayed at all.
Is there anything, not stated in the API-reference of GtkNotebook, that gets
carried out for event-handling (keyboard-events) but not if one only calls
gtk_notebook_set_current_page() as is?
I am really confused atm.
Thanks in advance for you time and kind advice!
Best regards...
MacSlow
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]