Dynamically loading widgets

View: New views
2 Messages — Rating Filter:   Alert me  

Dynamically loading widgets

by tim wylie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello,
  I was wondering if it were possible to have XML that could be dynamically loaded to the GUI after the main window was already up.  Like if I wanted to have a window with one button, and everytime I pressed it, some glade xml that specified a button was loaded at some specified position.  Ideally, I'd like this all to be within a fixed container and each sub-xml file be a frame with other widgets on it.  I couldn't find any code related to this.  Do you know of any examples? 
Thanks,
Tim


Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.
_______________________________________________
Glade-users maillist  -  Glade-users@...
http://lists.ximian.com/mailman/listinfo/glade-users

Re: Dynamically loading widgets

by Alexey Kurochkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-10-08 at 01:39 -0500, tim wylie wrote:
> Hello,
>   I was wondering if it were possible to have XML that could be
> dynamically loaded to the GUI after the main window was already up.
> Like if I wanted to have a window with one button, and everytime I
> pressed it, some glade xml that specified a button was loaded at some
> specified position.  Ideally, I'd like this all to be within a fixed
> container and each sub-xml file be a frame with other widgets on it.  

Just build your widget from xml in you button "clicked" callback and add
it to the container in question with appropriate for that container
function.

> I couldn't find any code related to this.  Do you know of any
> examples?  
> Thanks,
> Tim
>
>
> ______________________________________________________________________
> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up
> now.
> _______________________________________________
> Glade-users maillist  -  Glade-users@...
> http://lists.ximian.com/mailman/listinfo/glade-users


_______________________________________________
Glade-users maillist  -  Glade-users@...
http://lists.ximian.com/mailman/listinfo/glade-users