Backwards TGVerticalSplitter

Hi!

Attached is a macro of using TGVerticalSplitter with a fixed frame on the right side of the canvas. I was hoping it would work such that the canvas’s size would remain dynamic with a fixed frame on the right size that can be adjusted with the vertical splitter. I doubted this was possible since I’m going against the rules listed in the user’s guide, but I thought I’d try it out anyway. :smiley:
So my question is asking for confirmation that what I’m trying to do truly can’t be done. (The macro creates a gui that resizes the canvas in the manner I’d like it to, but the splitter on the right is backwards.)

Thanks!
test_vsplitter.c (2.72 KB)

Hi,

Use kLHintsLeft when adding your frames:

frame2->AddFrame(vframe2, new TGLayoutHints(kLHintsLeft | kLHintsExpandY)); frame2->AddFrame(split2, new TGLayoutHints(kLHintsLeft | kLHintsExpandY, 5, 5, 0, 0)); And if you need to change (swap) their position, simply change the order you add them in their parent frame…

Cheers, Bertrand.

Hi Bertrand,

Thank you for your response. I was wondering if you wouldn’t mind double checking my macro for me please. I believe I made the changes you suggested, but the splitter still works backwards. Did I understand your instructions correctly?

Thank you.
test_vsplitter.c (2.77 KB)

Cheers, Bertrand.

Cheers, Bertrand.

Hi Bertrand,

Thank you very much! I really appreciate it.

You’re very welcome! And sorry for the lost replies…

Cheers, Bertrand.

No worries! Thanks for getting the forum back up and running.