- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Container Tab Index
Hi
I have a container which contains two tab for two charts. I want to know which tab is the currently active tab like GetActiveTabe(). I dont wanna change anything in the container just want to get the index.
Since there is no trigger, is there a walk around?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AFAIK - only with a VBScript Macro like this:
Sub GetActiveTab
Set ContainerObj = ActiveDocument.GetSheetObject("CT01")
Set ContProp=ContainerObj.GetProperties
ActiveObject=ContProp.SingleObjectActiveIndex
MsgBox ActiveObject
End Sub
BTW: Macros are considered "evil" ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The alternative is to use separate charts instead of a container and show/hide these charts as needed based one or more variables that are controlled by button clicks or a selection in a listbox. You can find an example here: Toggling multiple charts with variables and conditional show
talk is cheap, supply exceeds demand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AFAIK - only with a VBScript Macro like this:
Sub GetActiveTab
Set ContainerObj = ActiveDocument.GetSheetObject("CT01")
Set ContProp=ContainerObj.GetProperties
ActiveObject=ContProp.SingleObjectActiveIndex
MsgBox ActiveObject
End Sub
BTW: Macros are considered "evil" ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why MsgBox? )
Thanks anyways
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It should have been removed of course (the MsgBox) ... only tor testing ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This was an issue that I brought up to R&D a while ago. Those who are using certain versions QlikView will notice that these properties no longer produce the desired result. The API for getting the active object and changing the active object programmatically can be found in this article with examples: https://support.qlik.com/articles/000070090