Hi Andreas,
thanks for reporting this problem. The fix is now in CVS.
It was a problem of (lack of) focus management in TGTextEdit.
Cheers, Fons.
Andreas Zoglauer wrote:
>
> Hi Rooters,
>
> I have dialog window, containing a TGTextEntry and a TGTextEdit element.
>
> When I click on the TextEntry and enter text and afterwards click on the
> TextEdit to enter text, the text is entered into the TextENTRY instead of
> the TextEdit...
>
> It seems that I am unable to get the focus on the TGTextEdit element!
>
> Here is a modification of the guitest-example to reproduce the problem:
>
> class TestMsgBox : public TGTransientFrame {
>
> private:
>
> ...
>
> TGTextEntry *fTitle; // <-- modified
> TGTextEdit *fMsg; // <-- modified
>
> ...
> }
>
> 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())
> {
>
> ...
>
> fTitle = new TGTextEntry(f4, fTbtitle = new TGTextBuffer(100));
> fMsg = new TGTextEdit(f5, 10, 10, "no comment"); // <-- modified
>
> fTbtitle->AddText(0, "MsgBox");
> //fTbmsg->AddText(0, "This is a test message box.");
>
> fTitle->Resize(300, fTitle->GetDefaultHeight());
> fMsg->Resize(300, 50); // <--- modified
>
> ...
>
> }
>
> After compiling and opening the message box test do the following:
>
> - Click on the Title-entry field and enter some text (this should work)
> - Click on the Message-entry field and TRY to enter some text
> --> although the cursor is in the Message-entry filed (TGTextEdit)
> the text is enter in the Title-entry field (TGTextEntry)
>
> Am I missing something important to bring the focus the the TextEdit?
> Any suggestions are welcome!
>
> Andreas
>
> ROOT: v3.01.06 (recompiled from cvs, 20-Aug-01)
> OS: SuSE 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