Same Gadget on Multiple Tabs?

BlitzMax Forums/BlitzMax Programming/Same Gadget on Multiple Tabs?

Gabriel(Posted 2006) [#1]
I have a fairly simple application with a Tabber and multiple tabs, each of which has a panel parented which controls the visibility of everything on that tab.

I'd like one gadget to appear on every tab. Namely, my 3d render window. My 3d engine of choice does permit me to create multiple render windows, but I really don't want to do that. It's so wasteful. What I'd like to do is keep the canvas I'm embedding the 3d render window into visible on all tabs. Try as I might, I can't find a nice way of doing this.

The only solution I've come up with which *might* work is to have three panels, for each tab, spread around the 3d render window, and then a communal panel for the render window. But having three panels for each tab is very unwieldy and makes it very hard to manage tabs properly. At the moment, I'm putting the panel into the Tabber GadgetItem's "Extra" field, so I can just typecast that into a tGadget and show it. I could not put three different panels into one extra field though, so I would have to manage tabs in a different ( and potentially ugly ) manner.

TonyG's method of changing parents won't work for this as it doesn't physically change the group the gadget belongs to, it just changes the parent reference, which is ideal for what I needed in that thread, but won't make my Canvas appear on different panels at will.

Is there a clean method of doing this at all?


Dreamora(Posted 2006) [#2]
The simplest way would be parent it to the window instead of the tabber and create it after the tabber. Then it would be "in front of it" and you could hide it if a tabber was used where it shouldn't be shown.

Thats the easiest solution I could think of


tonyg(Posted 2006) [#3]
Not sure I completely understand but won't the canvas show wherever you put it?



Gabriel(Posted 2006) [#4]
Ahh yep, I thought it wasn't showing because the "invisible" panels were blocking it, but it was just the order of creation that was the problem. If I create it after I've created all the other panels for the other tabs, it shows up fine on all tabs. Thanks guys.