Re: Changing the GUI dynamically created by glade



Hi

On Fri, 2009-05-01 at 04:05 +0530, saurabh gupta wrote:
> hello all,
> 
> I am using glade-3 and gtk+ library in C to build GUIs. I have a
> special requirement in creating the GUIs.
> 
> I need to create window which will have the variable number of
> horizontal blocks. In short, the layout of the window will be like :
> 
> 
> |-------------------------|
> |    header           |
> |------------------------ |
> | horizontal box 1  |
> |------------------------ |
> | horizontal box 2  |
> |        .                |
> |        .                |
> |        .                |
> |        .                |
> |------------------------ |
> | footer of window |
> |-------------------------|
> 
> 
> Now, the number of horizintal boxes are decided on run time. Basically
> all horizontal boxes are identical in layout and differ only in label
> and the callback function connection.
> 
> What I needed is to create a GUI in glade which will decide the layout
> of header, one horizontal box and the footer of the GUI. I created
> *vbox* with three items in glade. One item contains header, another
> the layout of horizontal box and the third one the footer. Now, at run
> time, I want to replicate the horizontal boxes with its full
> properties (of horizontal boxes) and its child widgets. I load the xml
> file of glade, but I am stuck at how to replicate the horizontal
> boxes. Basically, the need is to replicate the boxes so that all the
> properties are replicate. Glade is needed because the layout of
> horizontal box can change at later stage.
Create a glade file with vbox with three rows, and set the "Pack Type"
property under "Packing" page.

|-------------------------|
|    header               |  <----- Pack Type: start
|------------------------ |
| horizontal box 1  |
|------------------------ |
| horizontal box 2  |
|        .                |
|        .                |
|        .                |
|        .                |
|------------------------ |
| footer of window        | <------ Pack Type: End
|-------------------------|


> 
> 
> I guess there would be some method to implement this and get the whole
> horizontal widget from glade file and then resize the number of items
> of original *vbox* and inserting the new horizontal boxes.
The rest can be added using gtk_box_pack_start .


ps: Are you look for GtkTreeView ?


> 
> Any help will be highly appreciated.
> 
> 
> Thanks
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
-- 
Ritesh Khadgaray
Ph: +919970164885
Desktop LinuX N Stuff, RHCE
Software Maintenance Engineer, Pune, Red Hat
ॐ मणि पद्मे हूँ
Eat Right, Exercise, Die Anyway.




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