How to hide the left tab in a TRootBrowser?

Dear all, and in particular Bertrand, :slight_smile:

I would like to be able to hide the left and bottom TGTab in a TRootBrowser. I thought that I could just set their dimension to 0 or 1 like this, but it didn’t work :

Could you tell me how to do that ?
The idea is that the user could still manually expand them if needed.

Thank you
Barth

Hi Barth,

Try this way:

TBrowser *b = new TBrowser(); ((TRootBrowser*)b->GetBrowserImp())->GetTabLeft()->GetParent()->Resize(1,0); ((TRootBrowser*)b->GetBrowserImp())->Layout();
Cheers, Bertrand.

Hi,

thank you very much, it works.
To be noted that GetParent() returns a const and it poses a problem with resize. I had to cast to TGWindow (non const).

Cheers
Barth

EDIT: the code snippet of Bertrand works as is. It was in my specific case that it didn’t.