Re: Scrolling GUI

From: Ilka Antcheva <Ilka.Antcheva_at_cern.ch>
Date: Tue, 09 May 2006 09:41:00 +0200


Hi Reiner,

The TGCanvas widget we have is a frame containing two scrollbars (a horizontal and vertical) and a view port that acts as a window through which the contents of the container frame can be seen. The creation of any TGCanvas object requires a few more settings related to its container and view port. For example:

   fGcan = new TGCanvas(your_main_frame, width, height, options);    fContent = new
TGCompositeFrame(fGcan->GetViewPort(),width1,height1,options1);

   layout = new TGXYLayout(...);
   fContent->SetLayoutManager(layout); //layout will be deleted by fContent    fGcan->SetContainer(fContent);
...
You can find examples in guitest.C, RootShower.cxx, TSessionViewer.cxx, TGedEditor.cxx, etc.

Cheers, Ilka

Reiner Rohlfs wrote:

>Hi ROOT team
>
>We want to build a big GUI window with a lot of widgets, for example simple
>text buttons, combo boxes, entry fields, etc. If there is not enough space on
>the screen, we want to scroll all widgets in the window up and down. Is there
>already a simple implementation in ROOT to scroll widgets? Or do I have to
>implement something similar as a TGListBox with a TGCanvas, a TGContainer and
>TGViewPort? One requirement would be to use the TGXYLauyout manager to layout
>the widget windows in the TGViewPort.
>
>Thanks Reiner.
>
>
>
>
Received on Tue May 09 2006 - 09:41:09 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:58 MET