Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Community,
I am trying to change the button (text object) color dynamically.
I am using a variable 'vButtonColor' set as 0/1 to calculate the color of the object. Also, the text of the active button must be bold.
While it is done, how can I change the color of all inactive buttons to gray while the active button remains green?
Please find the document attached herewith.
Regards & Thanks,
-Khaled.
I think you need to be able to distinguish between the different buttons pressed, so you need to use separate variables for each button or one variable and setting different variable values.
I am using a new variable vActiveSheet and just setting the target sheet id in the action.
Then I use conditional colors for the background / text color depending on the variable value.
Instead of setting the variable in the button / text box action, you could also use the action in OnActivateSheet trigger in the sheet properties, so it also works when selecting your sheet on the tab row. Since I assume you want to hide this tab row anyway, the implemented method should be enough.
Regards,
Stefan
Hi
From your example, you want to change the text box colour based on the active tab?
These examples change the tab colour when the user changes the current tab:
http://community.qlik.com/message/115252#115252
http://community.qlik.com/message/31575#31575
You could use the same logic to change the text object colour.
But if I may make a suggestion. Your tab selection text object exists on each tab. Why not set the active tab colour manually on each tab? See the attached.
Regards
Jonathan
I think you need to be able to distinguish between the different buttons pressed, so you need to use separate variables for each button or one variable and setting different variable values.
I am using a new variable vActiveSheet and just setting the target sheet id in the action.
Then I use conditional colors for the background / text color depending on the variable value.
Instead of setting the variable in the button / text box action, you could also use the action in OnActivateSheet trigger in the sheet properties, so it also works when selecting your sheet on the tab row. Since I assume you want to hide this tab row anyway, the implemented method should be enough.
Regards,
Stefan
Hi...
Thank you Jon and Swehi.....i was looking for just the same 🙂
Regards,
-Khaled