Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to conditionally show/hide objects based on maximize, minimize status

Hello QlikView Experts,

My humble beginnings with QlikView application development has brought me to this interesting situation. I have to create an application that should have 2 pivot tables in a single tab. But the Textboxes, current selection box etc should show selections exclusively for each pivot table selected. For this I have made use of alternate state and this works good so far. However, my second (and perhaps the only) challenge here now is how to conditionally show / hide the list boxes, selection box on this tab which will be based on the pivot table currently maximized?  Just so I am making sense here: Pivot1 when maximized should show textbox1 ,selection box1 similarly Pivot2 when maximized should show textbox2, selection box2 on that same tab and automatically must hide textbox1, selection box1 etc.

I know this can be achieved using macros and I went through some forums to get around it too (eg: Text object condition based on chart object minimised/maximised status ) but I am not able to get the code to work.

Any suggestions, help will be highly appreciated!

Thanks

Nakul

1 Solution

Accepted Solutions
maxgro
MVP
MVP

you can also use nested container, see attachment (tkanks to Alessandro, I use your objects and data); in your case I probably would use variable as suggested previously

View solution in original post

6 Replies
Not applicable
Author

Maybe this thread can help you out, it seems like there is an isMaximized function that can be used.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

QV11 removed the object OnActivate trigger so the referenced macro method no longer works

The only clean way to do this in QV11 is create a button that toggles a variable. Use the variable to control the visibility of the objects.

-Rob

alexandros17
Partner - Champion III
Partner - Champion III

Here is an example

maxgro
MVP
MVP

you can also use nested container, see attachment (tkanks to Alessandro, I use your objects and data); in your case I probably would use variable as suggested previously

Anonymous
Not applicable
Author

Thanks Massimo for this example! I am using your approach to have the pivot and it associated listbox, multibox, button etc , in separate container object and then adding these containers to a new container (nesting). Not sure if this optimal way to achieve the result.

Anonymous
Not applicable
Author

Thanks Rob! I did spend some time and came up with the logic to show/hide objects based on action in Button. Eg: don't show pivot 1 when pivot 2 is visible and vice-versa. However it got bit complicated for me to extend this logic to show/hide 5 pivots. Couldn't get this logic to work using Buttons:-  "if any one of other 4 pivots is currently shown , then the button should not allow showing pivot 5 and should either close the other pivot that is open or at least pop up a help text asking user to first close the xyz pivot". Basically allowing only one pivot to be seen when you have 5 pivots on the same sheet and an equal or less number of buttons to control the hide/show. I am currently using nested container approach. But please feel free to suggest.