Re: Some "reparented" widgets not shown immediately



Thanks for the rapid answer.

This isn't much of an answer, but have you tried something like:

widget->hide() ;
reparent( widget ) ;
widget->show() ;

Just tried, didn't work.

Are you drawing these widgets in separate windows in glade to actually
have them viewable in those windows or are you just using windows to
store the widget setup and then retrieving those widgets for display
exclusively in your HPane?

Yes, I'm using windows just to store the widgets. This is not the kind
of GUI I'm used to develop, but this is the most elegant and simple
way I found to satisfy the requirements for the application I'm
developing.
In words, there is a list of icons on the left pane, which once
clicked causes the activation of the associated "section" (this is how
I call the stuff I place on the right pane), displaying it on the
right pane.


If the later, you can specify a widget name like:
Gnome::Glade::Xml::create( filename, widget_name )

Which starts the widget tree creation from that widget, thus the
widget is not initially contained in a window which should
theoretically fix things although it doesn't provide a reason for why
this is happening.

I don't quite understand how to apply this solution since
reparent_widget() requires the name of the widget to reparent. Can you
please provide an example?
I hope this won't need major changes to the code of my application
which is in an a pretty advanced stage of development...

As a side note, I replaced the reparent call:

glade->reparent_widget(to_activate->get_name(), *_main_paned);

with:

to_activate->get_parent()->remove(to_activate);
_main_paned->add2(to_activate);

This didn't work, too. I think what I really need is simply a way to
force the widget to show up...



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