Re: [ROOT] Retrive text from a TGTextEdit...

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Mon May 27 2002 - 16:45:08 MEST


Hi Andreas,

  the best way is to do it yourself by looping over the lines of the
returned TGText*. Creating the TString you might want to do something
like adding \n or apply some filter. So it is best to leave this to the
customer.

-- Fons


On Mon, 2002-05-27 at 13:22, Andreas Zoglauer wrote:
> 
> Hello!
> 
> Is there a reason why in TGTextEdit no function like
> 
> TString TGTextEdit::GetText()
>   ( or alternatively: GetString() )
> void TGTextEdit::SetText(TString Text)
>   ( or alternatively: SetString(const TString& Text) )
> 
> exists?
> 
> If one wants to retrive the whole text as a string one has to
>   (a) get the TGText*
>   (b) compose the string by adding all the lines of the TGText
> 
> Isn't there any easier way?
> 
> 
> Andreas
> 
> 
> ----------------------------------------------------------------------
> 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 : Sat Jan 04 2003 - 23:50:54 MET