Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

thornofcrowns
Valued Contributor II

Changing Button Images

Hi All,

I have a question regarding buttons that use a combined image.

We have a dashboard with lots of buttons on it, which programmatically change colour when there's related data. For example, if I click Button1, it sets a variable and Button2 changes colour.

I'm trying to work out a way of doing this with images, i.e. click Burron1 and Button2 changes the image from btnOrange.png to btnBlue.png.

Is this possible or is there a way to do it otherwise?

Thanks.

1 Solution

Accepted Solutions
Highlighted

Re: Changing Button Images

You probably already guessed that there is no conditional show for button images, or an expression field that decides on which image to show. Just like there isn't any support for changing X/Y/H/W-coordinates of charts and other objects based on the outcome of an expression.

Of course, if you don't like the hidden button-approach, you could always try to solve this programmatically using macros. And as always with macros, your client may decide not to support your solution...

6 Replies
MVP
MVP

Re: Changing Button Images

May be you can have another set of buttons with btnBlue.png or so and make its appearance conditional(Layout->Show ->Conditional)

Not applicable

Re: Changing Button Images

Hi,

1. Create button 1 and button 2

2. add action in two buttons for variable value (eg. vVar=0 for button 1 and vVar=0 for button  2

3. Create 2 more text box and load image to each text box( Image 1 and 2)

4. Go to image text box properties > Layout> Conditional show

    For Image1 Text box--------    if(vVar=1,1,0)

    For Image2 Text box--------    if(vVar=0,1,0)

Regards,

Joshmi

thornofcrowns
Valued Contributor II

Re: Changing Button Images

Thanks for your replies, but I was rather hoping not to have to replicate all of fthe buttons.

Highlighted

Re: Changing Button Images

You probably already guessed that there is no conditional show for button images, or an expression field that decides on which image to show. Just like there isn't any support for changing X/Y/H/W-coordinates of charts and other objects based on the outcome of an expression.

Of course, if you don't like the hidden button-approach, you could always try to solve this programmatically using macros. And as always with macros, your client may decide not to support your solution...

thornofcrowns
Valued Contributor II

Re: Changing Button Images

Thanks Peter, again I can't use macros. It looks like I'll have to bite the bullet and replicate the buttons.

Employee
Employee

Re: Changing Button Images

You could use text-objects instead of buttons, with representation set to image and use an expression like:

=if(VariableOrField='Value','image1','image2'), you will however lose the "buttonlook".

Community Browser