Vertical Frame, Button Group and Button

Hello,
I have a problem with the example posted as attachment. The example consist in a vertical frame that contains:

  • a list box
  • an horizontal frame
    The horizontal frame contains:
  • a list box
  • a vertical frame
    The last vertical frame contains:
  • a Button Group with 3 radio button
  • a Text Button
    The problem is that the last text button and the button group are overlapped. Why?

Thank you very much
Andrea Bulgarelli
test.C (1.99 KB)

Hi Andrea,

You made an error in line 30 of your macro - instead of

br->AddFrame(fVF1, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 0,0,0,0));

do:

fVF1->AddFrame(br, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 0,0,0,0));

Also, do not use AddFrame with TGButtonGroup because the buttons are
automatically added with a default layout hints to their parent, Show() method will map them;
i.e. delete the lines 35, 36, 37.

Best regards, Ilka

Thank you very much!
It works!
Andrea Bulgarelli