Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, i thought i'd share the following description of how to make dynamic buttons - In this instance there will be two buttons which will toggle color depending on which one you click. Here:
Add another Action
Then redo steps 3 to 5 to create the 2nd Button
Add another Action
Done. Adjust and add a clear button to exercise, or select specific fields in your application.
Hint: Use Select in Field as action type.
Ifyou're really struggling to follow these steps, then let me know i can always upload the qvw.
I am doing a similar thing, but want to change the button label. I'm doing this with a Set Variable action and it works, but the problem is that the button keeps resizing to 39 width which is smaller than my text causing it to get squished up.
Is there a way to prevent the button from resizing? If that's not possible, how about the ability to set the button size via variable?
Rick
Helo Rick, try unticking the "Allow Move/Size" box from the Layout Tab of the button you're working on.
This will ensure that button cannot be moved or resized. Hope this helps.
That only prevents an end user from dragging the size to a different size. What I really need is to be able to specify the width of say 90 and make the button stay 90 even if the label is only "One". A label of "One" is automatically resized down to something like (not in front of QV at the moment) 30. I want all of the buttons to be the same size regardless of the text displayed.
Hi buddhabang,
It can be simplified with single variable itself
On button1 click assign variable value as 1
On button click assign variable value as 2
then for changing colors
if(vButton=1, rgb(0,0,0), rgb(255,255,255))\\For button 1
if(vButton=2, rgb(0,0,0), rgb(255,255,255))\\For button 2
Thanks Celambarasan, but wanted to make it clearer. But yeah it goes without saying.