Re: [ROOT] TGTextEntry and SetAlignment(kTextRight)

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Aug 21 2001 - 20:07:22 MEST


Fixed in CVS. Thanks for reporting this problem.

Cheers, Fons.



Andreas Zoglauer wrote:
> 
> Hi Rooters,
> 
> I encountered minor problems with SetAlignment in the class TGTextEntry:
> 
> Using SetAlignment(kTextRight) does not display the text correct - the
> text starts (or ends) some pixels outside the right border of the window.
> Therefore one can not read the whole text.
> 
> This can be reproduced if one adds the following line into the guitest
> file:
> 
> TestMsgBox::TestMsgBox(const TGWindow *p, const TGWindow *main,
>                        UInt_t w, UInt_t h, UInt_t options) :
>      TGTransientFrame(p, main, w, h, options),
>      fRedTextGC(TGButton::GetDefaultGC())
> {
> ...
> 
>    fMsg   = new TGTextEntry(f5, fTbmsg = new TGTextBuffer(100));
>    fMsg->SetAlignment(kTextRight);  // <-- Added
> 
>    fTbtitle->AddText(0, "MsgBox");
>    fTbmsg->AddText(0, "This is a test message box.");
> 
> ...
> }
> 
> Andreas
> 
> ROOT: 3.01.06 (recompiled from cvs)
> OS: SUSE Linux 7.2
> 
> ----------------------------------------------------------------------
> Andreas Zoglauer
> 
> MPI fuer extraterrestrische Physik         Phone:    +49/89-30000-3848
> Postfach 1312                              Fax:      +49/89-30000-3569
> 85741 Garching, Germany                    Email:    zog@mpe.mpg.de
> ----------------------------------------------------------------------

-- 
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 : Tue Jan 01 2002 - 17:50:58 MET