[ROOT] TGCanvas and container with ExpandX flag

From: sascha.zelzer@gmx.net
Date: Thu Apr 11 2002 - 15:51:38 MEST


Hi!

I played around with the TGCanvas class and think there is maybe a "feature"
missing. If one sets, e.g. a TGVerticalFrame as the container of a TGCanvas,
which contains itself elements with the kLHintsExpandX flag set, resizing of
the TGCanvas leads to some confusion. Expanding the TGCanvas horizontally
expands also the container (if not fixed) and its elements, but shrinking it
just results in a smaller viewport. I guess thats fine for elements with a
fixed size, but rather annoying if one wishes an automatic resize of the
contained elements in one direction. So I had a look at the TGCanvas::Layout() source
and I got the impression that it does not check this for shrinking the
Canvas.

I solved my "problem" in overloading the Layout function, but it would be
nice to get this behaviour naturally - or did I just completely miss something?

Thanks,

Sascha

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:49 MET