GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Mon Nov 24, 2014 9:22 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to switch text views after clicking button
PostPosted: Fri Aug 10, 2012 1:54 pm 
Offline

Joined: Fri Aug 10, 2012 1:41 pm
Posts: 1
I am building an application that will allow users to click a button and then move to the next piece of information in the same window. I am using glade which generates xml-like code I am not sure how to implement this. I have a textview that would cycle through image widgets and textviews as the user clicks the next button.

Having trained in java I would simply create a variable that keep track of the page number and perhaps use a switch statement to determine which page should be shown. However I am unclear as to how I would implement this sort of code in in glade-xml mixed with the gtk-builder in C.

It seems inefficient to implement the same gui as many times as there are pages with different code for the text view.

Can someone please give me some clues?


Top
 Profile  
 
 Post subject: Re: How to switch text views after clicking button
PostPosted: Fri Aug 10, 2012 7:27 pm 
Offline
Never Seen the Sunlight

Joined: Wed Jul 23, 2008 10:31 am
Posts: 2406
Location: Slovenia
Hello and welcome to the GTK+ forums!

In situations like this, I usually "abuse" GtkNotebook. For each page I need, I create separate tab and then simply hide the tabs. This way user cannot change tabs on it's own. Moving forward/backward is then a simply matter of selecting proper tab.

Cheers,
Tadej


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group