Re: [glade--]Fix for set_size_request



Mark Jones wrote:
At 08:32 AM 10/23/2002 +0200, Christof Petig wrote:
The problem is that the wrong tag is used. w is the <widget> and not the <packing> tag. Fix is:

   const ChildParamList ch(w.get_Child_params());
   int x=ch.getIntProperty("x",0);


I was hoping you might know or be able to tell from the debug I did. Hopefully it was somehow helpful to you in determining this.

I initially knew what was wrong when you said that if you put the tag into the <widget> it works. So this helped a lot. Thanks.


I just never use fixed because once you swith the theme/font/language it get's a mess (or only ugly if you are lucky). But people used to other visual design tools prefer it because it's easier to place the widgets by hand than designing an well looking vbox/hbox/table/alignment hierarchy (if I guess right).


Is it considered good gui programming style to continually put vbox's inside of hbox's over and over as needed? What about if you have an

AFAIK it's a matter of taste whether this is good programming style. Personally I prefer it this way because if you resize widgets (read: e.g. change the contents of a label) or add widgets the whole structure remains sane. IMHO a depth of four boxes inside another is perfectly manageable. But my coworker prefers tables (which allow two dimensional adjustments of each widget, not one dimensional) which I hate once reaching a certain depth.

If I need controlled space between widgets in a box (and "pack_start, pack_end, box expanding, both widgets not" is not sufficient (I doubt that)) I usually put an empty label between them.

Try to OOize your widget structure by using 'separate class' for complex substructures or use custom components which are reusable (!) (tell me if the overview in the users manual is not clear enough).

If you want an example take a look at e.g.
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/*checkout*/manuproc/Komponenten/src/Optionmenu_Instanz.hh?rev=HEAD&content-type=text/plain

hbox, that you want two buttons side by side in, in the same row, but you want some spacing between them (and only between them)? I thought fixed layout was the only way to do such things. Anyone who wants to jump in here and give me some info, feel free. This may not be the

  Christof




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