RE: control size of a TGGroupFrame

From: Bertrand Bellenot <Bertrand.Bellenot_at_cern.ch>
Date: Mon, 25 Oct 2010 11:51:16 +0200


Hello Patrick,

I just tried to use a TGGroupFrame with the following macro:

void test_group()
{

   TGMainFrame *fExtrema_f = new TGMainFrame(gClient->GetDefaultRoot(), 150, 150);    TGGroupFrame *fExtrema_min = new TGGroupFrame(fExtrema_f, "min", kVerticalFrame);

   fExtrema_min->AddFrame(new TGLabel (fExtrema_min, new TGString (" Abscissa:")), new TGLayoutHints (kLHintsTop));
   fExtrema_min->AddFrame(new TGLabel (fExtrema_min, new TGString (" skdjfhks:")), new TGLayoutHints (kLHintsTop));
   fExtrema_min->AddFrame(new TGLabel (fExtrema_min, new TGString (" lghkjglp:")), new TGLayoutHints (kLHintsTop));
   fExtrema_f->AddFrame(fExtrema_min, new TGLayoutHints (kLHintsCenterX | kLHintsCenterY));
   fExtrema_f->MapSubwindows();
   fExtrema_f->Resize();
   fExtrema_f->MapWindow();

}

And I obtain something like the picture in attachment. If it is not what you get, or if you cannot solve your problem with your own code, could you provide a short running macro showing the problem you have?

Cheers, Bertrand.

-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Patrick Dupre Sent: Tuesday, October 19, 2010 13:35
To: roottalk_at_root.cern.ch
Subject: [ROOT] control size of a TGGroupFrame

Hello,

I have an object:
TGGroupFrame *fExtrema_min = new TGGroupFrame (fExtrema_f, "min", kVerticalFrame) ;

Then I fill it like:
fExtrema_min -> AddFrame (new TGLabel (fExtrema_min, new TGString (" Abscissa:")), new TGLayoutHints (kLHintsTop)) ;

But I cannot control the size of the Frame ! For example, like it is it is a lot too large.

My tries to resize fail

thank for your help

  --
---


  Patrick DUPRÉ                      |   |
  Department of Chemistry            |   |  Phone: (44)-(0)-1904-434384
  The University of York             |   |  Fax:   (44)-(0)-1904-432516
  Heslington                         |   |
  York YO10 5DD  United Kingdom      |   |  email: patrick.dupre_at_york.ac.uk
==========================================================================

group_frame.png
Received on Mon Oct 25 2010 - 11:51:22 CEST

This archive was generated by hypermail 2.2.0 : Mon Oct 25 2010 - 17:50:02 CEST