Re: Unidentified subject!



* w.schuller@gpph.unimelb.edu.au (w.schuller@gpph.unimelb.edu.au) wrote:
> Subject: Hiding widgets without destroying them question
> hi,
> 
> I have some gtk related questions about a gnome app I am working on.
> 
> Is it possible to have a clist widget (or any widget) dissappear from it's container, put something else in that container, then put the clist back into that container at a later stage? Is it possible to access the row data of this widget while it is 'hidden'?
> 
> The gtk tutorial is good for displaying widgets but not removing them!
> 
> I have browsed the gtk header files and seen commands like gtk_widget_hide, but I'm not sure if this does what I want to do. I've tried experimenting with the different commands but I can't seem to get the behaviour I want.
> 
> Is there an app around that does this sort of thing from which I can examine the code?
> 
> ta,
> wayne.

In simple cases, you can just pack the things into an hbox, then when
you wish it to go away, use gtk_widget_hide, and then gtk_widget_show
the other. This way, you don't need to ref the widget, and then remove
it. This gets more annoying to code if you are switching between loads
of widgets.

Several gnome-applets use this technique for resizing/reorienting with
the panel.

Tom.
-- 
            .-------------------------------------------------------.
    .^.     | Tom Gilbert, England | tom@tomgilbert.freeserve.co.uk |
    /V\     |----------------------| www.tomgilbert.freeserve.co.uk |
   // \\    | Sites I recommend:   `--------------------------------|
  /(   )\   | www.freshmeat.net www.enlightenment.org www.gnome.org |
   ^^-^^    `-------------------------------------------------------'



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