Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

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?

Capture.PNG

1 Solution

Accepted Solutions
MVP
MVP

Re: Container Tab Index

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" ...

4 Replies

Re: Container Tab Index

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
MVP
MVP

Re: Container Tab Index

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" ...

Not applicable

Re: Container Tab Index

Why MsgBox?  )
Thanks anyways

MVP
MVP

Re: Container Tab Index

It should have been removed of course (the MsgBox) ... only tor testing ...

Community Browser