TGGroupFrame and Windows Vista

Hello,

I have done a GUI for my application using Root 5.22. At one point I am using a TGGroupFrame and some widgets inside it. On Linux and MacOS we can see the widgets, but on Windows Vista (with Root 5.23) we do not see them, I think they are behind the TGGroupFrame. My code is the following :

//Accelerator parameters of the simulation
fGroupFrameAcceleratorParameters = new TGGroupFrame(this,"Accelerator parameters");
fGroupFrameAcceleratorParameters->MoveResize(5, 80, 690, 80);
	
//Number of particles
fLabelNBParticle = new TGLabel(this, "Number of particles:");
fLabelNBParticle->Move(10, 100);
fNumberEntryNBParticle = new TGNumberEntry(this, (Double_t) 1000,6,-1);
fNumberEntryNBParticle->SetLimits(TGNumberFormat::kNELLimitMin,0);
fNumberEntryNBParticle->MoveResize(140,97,70,20);
fGroupFrameAcceleratorParameters->AddFrame(fLabelNBParticle, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
fGroupFrameAcceleratorParameters->AddFrame(fNumberEntryNBParticle, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));

Maybe I did a mistake in this code, but I do not understand why it is working on Linux…

Thank you very much,

Pierre-Louis

Hi Pierre-Louis,

Please try this (correct) way:

[code]//Accelerator parameters of the simulation
fGroupFrameAcceleratorParameters = new TGGroupFrame(this,“Accelerator parameters”);
fGroupFrameAcceleratorParameters->MoveResize(5, 80, 690, 80);

//Number of particles
fLabelNBParticle = new TGLabel(fGroupFrameAcceleratorParameters, “Number of particles:”);
fLabelNBParticle->Move(10, 100);
fNumberEntryNBParticle = new TGNumberEntry(fGroupFrameAcceleratorParameters, (Double_t) 1000,6,-1);
fNumberEntryNBParticle->SetLimits(TGNumberFormat::kNELLimitMin,0);
fNumberEntryNBParticle->MoveResize(140,97,70,20);
fGroupFrameAcceleratorParameters->AddFrame(fLabelNBParticle, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
fGroupFrameAcceleratorParameters->AddFrame(fNumberEntryNBParticle, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));[/code]The Windows version respects the parent-child hierarchy :wink:

Cheers,
Bertrand.

Hello,

Thank you for your answer. I tried to change this in fGroupFrameAcceleratorParameters but it still doesn’t work. Maybe there is an order in the MoveResize, isn’t it?

Thank you,

Pierre-Louis

Hi Pierre-Louis,

OK, I cannot try on Windows until Monday, but I was just wondering… I hope you have this kind of line somewhere in your code:

Otherwise, please add it :wink:
And if it still doesn’t work, please post a working macro showing exactly your layout construction problem (this will save our time)

Cheers, Bertrand.

I will test it on Tuesday (I don’t have my Vista computer today), and I will let you know if it works.

Thank you,

Pierre-Louis

I just tested it and it works for me. So if it doesn’t for you, please provide your full source code.
Cheers, Bertrand.

Thank you Betrand, it is working well now!

Pierre-Louis