Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ivandrago
Creator II
Creator II

Hide Text Box when Object is not selected in Container

Hi,

I want a Text Object to Hide when a different Object within the  container is selected, is this possible?

Thanks

1 Solution

Accepted Solutions
vgutkovsky
Master II
Master II

Ivan,

No, this is not possible. There is currently no way to check what object is active in a container. To get around this problem, I usually just create buttons and hide/show groups of objects based on those buttons--i.e. I just avoid the container altogether. Depending on client requirements, I sometimes make the buttons look like container buttons so users may not even know the difference.

Regards,

Vlad

View solution in original post

6 Replies
vgutkovsky
Master II
Master II

Ivan,

No, this is not possible. There is currently no way to check what object is active in a container. To get around this problem, I usually just create buttons and hide/show groups of objects based on those buttons--i.e. I just avoid the container altogether. Depending on client requirements, I sometimes make the buttons look like container buttons so users may not even know the difference.

Regards,

Vlad

jagan
Luminary Alumni
Luminary Alumni

Hi,

There is no event/method to capture which object is selected in Container, so by using container it is not possible.  You can do this by using buttons and variables.

Regards,

Jagan.

Gysbert_Wassenaar

I think the only way to do this is with a macro.

sub GetIndex

Set obj = ActiveDocument.GetSheetObject("CT01")

Set p =obj.GetProperties      

vIndex= p.SingleObjectActiveIndex

ActiveDocument.Variables("vIndex").SetContent vIndex, true

End Sub

And set the conditional display expression of the text box to something like if(vIndex=2,1,0) to show it when the third object in the container is active and otherwise hide it.


talk is cheap, supply exceeds demand
ivandrago
Creator II
Creator II
Author

Hi Gysbert,

Have you got a example document, I'm using version 11 sr2; I've tried to do what you asking but does not seem to be working?

Gysbert_Wassenaar

Sorry, I forgot it won't work in QV11 since the OnActivate object triggers were removed in that version.


talk is cheap, supply exceeds demand
ivandrago
Creator II
Creator II
Author

Thanks for your advice guys! Hopefully QlikTech will have a workaround the next release as its useful function the Container.