Re: TGListBox, TGFileDialog

Fons Rademakers (Fons.Rademakers@cern.ch)
Thu, 27 May 1999 15:23:57 +0000


Hi Michael,

have a look at $ROOTSYS/test/guitest.cxx for most of the GUI features.
Also, check $ROOTSYS/tutorials/dialogs.C for how to run the GUI from the
interpreter. Further, you can look into the source of the TRootBrowser and
TRootCanvas classes.

Cheers, Fons.

Michael Heldmann wrote:
>
> Hello !
> I'm trying to use the GUI-Classes in macros but i didn't find any
> examples.
> I tried to
>
> lb=new TGListBox(gClient.GetRoot(), 83)
> lb.AddEntry("test1", 101)
> lb.Draw()
>
> the ListBox didn't show up, why ?
> from this naiv approach you can see that i really didn't get the point
> of how to use that sutff.
>
> for a TGFileDialog I tried
>
> fi=new TGFileInfo()
> fd=new TGFileDialog(gClient.GetRoot(), gClient.GetRoot(), kFDOpen, &fi)
>
> from this i get a segmentation violation.
>
> I would really appriciate anybody helping such a dump newbie like me.
> Thanks
> Michael Heldmann

-- 
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 7677910