GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pointer to glade widget or container

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
abxccd
Familiar Face


Joined: 06 Mar 2010
Posts: 39

PostPosted: Sat Mar 06, 2010 11:56 am    Post subject: Pointer to glade widget or container Reply with quote

Hi everyone,

I have built a GUI with glade, and am currently using Anjuta to do my coding.

I am not using libglade. To import the glade file into my application, I am using the GTK builder and using C to write my code.

I have a table container in my glade GUI which I wish to resize (change number of columns and rows) during run time. Does anyone have any examples on how to do this?

Cheers! :D
Back to top
fidel
Familiar Face


Joined: 07 Aug 2009
Posts: 7

PostPosted: Sat Mar 06, 2010 2:15 pm    Post subject: Reply with quote

To get a pointer to a widget from a GtkBuilder, use:

http://library.gnome.org/devel/gtk/stable/GtkBuilder.html#gtk-builder-get-object

Once you have a pointer to the GtkTable, resizing is simple:

http://library.gnome.org/devel/gtk/unstable/GtkTable.html#gtk-table-resize

The "Minimal Application" section of Micah Carrick's tutorial shows an example of using gtk_builder_get_object to get a pointer to a GtkWindow. You should be able to adapt that to your purpose.

http://www.micahcarrick.com/01-01-2008/gtk-glade-tutorial-part-3.html#3
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP