Re: [ROOT] TGCanvas and container with ExpandX flag

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Thu Apr 11 2002 - 16:00:47 MEST


Please send me an example and your fix.

Cheers, Fons.



On Thu, 2002-04-11 at 15:51, sascha.zelzer@gmx.net wrote:
> 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
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



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