RE: Scrolling GUI

From: Valeri Onuchin <Valeri.Onoutchine_at_cern.ch>
Date: Wed, 10 May 2006 11:29:33 +0200


Hi,
scrolled frames are important parts of modern GUI. We are close to introduce TGCanvas class to the ROOT GuiBuilder's widget palette. That will allow to create scrolled frames (aka TGCanvases) dynamically duiring "gui building", with possibility to add simple/complex widgets to it.
It will be possible to activate(switch between) different types of layout managments (XY layout, broken layout, which similar to XY layout, tile layout etc.) for scrolled frames via options in context menu. Another possibility in GuiBuilder (which will be possible to switch on/off) will be dynamic creation of scrolled frame (TGCanvas) during resizing. When some composite frame with broken or XY layout is being resized and the size of this frame becomes smaller than its "content" - the scrolled frame will be dynamically created with "putting resized frame into it" ... and vice versa :)

Regards. Valeriy

-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch on behalf of Ilka Antcheva Sent: Tue 5/9/2006 9:41 AM
To: Reiner Rohlfs
Cc: roottalk_at_pcroot.cern.ch; Stephane.Paltani_at_obs.unige.ch Subject: Re: [ROOT] Scrolling GUI  

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 Wed May 10 2006 - 11:29:40 MEST

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