-
question about tabs
I'm looking at tabs and ways to use them.
I wanted to have a tab show up on a window only if the item in question was on a character or npc, but...
I can't seem to see a way to do this.
I found buttongroup_tabs.lua but it doesn't have a way to set visibility of individual tabs.
It has activateTabEntry(n) and deactivateTabEntry(n).
I'm unsure what deactivate actually does as when I try using it the tab is still visible, and active, clicks still work, I can change data on the tab.
Is there something else that needs to be done with the contents of the tab?
Is there an actual way to set a tabs visibility?
The work around I did was to do the following.
Code:
<windowclass name="skill_tabbed" copy="record_window_tabbed">
<windowclass name="skill" copy="record_window" />
<windowclass name="skill_header" copy="record_header" />
<windowclass name="skill_main">
In the shortcut on the character sheet the shortcut uses "skill_tabbed".
The registering of the skill data uses "skill".
So when creating new skills it uses "skill", but when opening the shortcut on the character sheet it uses "skill_tabbed".
Other than the icon for the shortcut on the character sheet being different than everywhere else it works fine, but would prefer to just use one windowclass.
Thanks,
Robert.
-
Tabs are mostly configured to work with predefined tabbed content.
If you want to add/remove tabs, you can do that to a degree with:
Code:
tabs.addTabData({ sName = sTabSubwindowName, sTabRes = sStringResourceName, sClass = sTabChildWindowClass, bEmbed = true, });
This will append a tab to the existing tabs. There are also functions for setTabData(#, tTabData) (to add) and setTabData(#, nil) (to remove) in a specific position.
Regards,
JPG
-
Thank you.
I think I'll just do it the way I was doing it with two windowclasses one with tabs and the other without.
It seems to be working fine that way.