'Common' area on Tab Panel?

Hi

Is it possible to implement a ‘common’ area for a Tab Panel?
That is, a way to have some controls appear on all panels?
I have a tab control to display stock inventory. Each tab has different properties of the stock item but I would like the Name & Price of the item to be shown on all Tabs.
Thanks
Mark

you can/could drop a container control on top and unparent it via context menu.

Yes, but the general practice is to leave “common” fields out of the tab panel (e.g. add extra space below the panel and put common things there).
Probably the human interface guidelines would have something for that…

Well yes I see that, but by their nature the ‘common’ items tend to be the most ‘important’ and so do not sit well at the bottom of the screen.
On the other hand, putting them above the tab panel looks equally odd as the tab button strip then sits between them and the detail data on the tab panel.
I recall coding in VB4 over 20 years ago and using an ActiveX (remember them!) Tab Control which even way back then, had a ‘common’ tab which placed any controls on that tab onto every tab.
Seems odd that Xojo has not managed to do that after it being a way to design UI’s for so long.
Maybe I will have to write my own :slight_smile:
Thanks
Mark

if you placed your common control inside of a tab you must unparent it and in the hierarchy it must be a level above. it is not best practice but maybe it works for you. could have some side effects.

The best way to do this, if your heart’s set on it, is probably to create a ContainerControl with all of the common code encapsulated, then put an instance of it on each panel of the TabPanel.

But this is against the idea of a Tab Panel, isn’t it ?

Just my opinion…

Yes, I would put these above the Tab Panel.

1 Like

@Mark_Ogier
Have you a Screenshot of 2 Tab Panels how they should look like?

I wouldn’t trust unparented layering, personally.

Then you could design it slightly differently:
Row 1: buttons or toolbar
Row 2: common controls
Row 3: PagePanel

Using a PagePanel rather than a TabPanel would get rid of the separation.

1 Like

Thanks @Arnaud_N I think I will have to do a UI rejig as you suggest.
Cheers
Mark

1 Like