[Glade-users] wish to generate widgets at run time



On Tue, 2009-01-06 at 15:07 +0530, anusha k wrote:
hi,

I am creating a form in which widgets have to be created at run time.

In our inventory module,we have product master in that we have
different categories.User will select one of the category as
needed.Accordingly widgets should added to my form at that selected
point.How to do this using glade .We have a list of possible
fields .Field combinations should be created at run time.Is it
possible to add XML by hand &  what is the syntax.

If you have fixed set of fields, and some of them are simply irrelevant
for certain categories, just put all the widgets in one view and
show/hide them when category changes. If categories do not share many
fields, but there is fixed set of categories, and fixed set of fields
per category, then use notebook container and show/hide tabs when
category changes (or even let the user select category by tab, if there
ain't too many of them). Otherwise, if positions and quantity of your
widgets is completely dependent on run time, then you don't need glade
at all and will be better off just creating/destroying widgets in the
code.




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