Page 1 of 2

TIWCGJQButtonSet Index or Checked?

PostPosted: 18 Jul 2014 08:01
by dfields
I am trying to select a specific button in a TIWCGJQButtonSet in an async event, but it does not work. When the user returns to a certain form I want the first button to be selected.

I have tried the following options:

1. MenuBtns.JQButtonSetOptions.Buttons[0].Checked := true;
2. MenuBtns.JQButtonSetOptions.Index := 0;

What method I be using?

Re: TIWCGJQButtonSet Index or Checked?

PostPosted: 18 Jul 2014 09:38
by Alexander Bulei
Hi dfields,

What is type of buttons?

Best Regards.

Re: TIWCGJQButtonSet Index or Checked?

PostPosted: 18 Jul 2014 21:15
by dfields
The button type is jqbtRadio.

Re: TIWCGJQButtonSet Index or Checked?

PostPosted: 21 Jul 2014 14:21
by Alexander Bulei
Hi dfields,

MenuBtns.JQButtonSetOptions.Buttons[0].Checked := true;


We have implemented the code to change it in V2.2.1.11.

Many thanks.

Best Regards.

Re: TIWCGJQButtonSet Index or Checked?

PostPosted: 25 Jul 2014 18:42
by dfields
I downloaded the attest build, but I still cannot get that feature to work. What code/method should I use to change the button that is selected?

Re: TIWCGJQButtonSet Index or Checked?

PostPosted: 25 Jul 2014 19:22
by Jorge Sousa
Hi Daniel

The attached form, contains a test case, and it works.

Re: TIWCGJQButtonSet Index or Checked?

PostPosted: 25 Jul 2014 20:00
by dfields
Your example does work and appreciate having it to test. However, it does not represent the original problem. I reported the wrong button type.

In my project all three buttons are jqbtButton, and the GroupIndex is set to 0. With those settings your test case fails. It is attempting to do something because the focus is removed from all buttons, but the desired selection is not rendered.

Re: TIWCGJQButtonSet Index or Checked?

PostPosted: 25 Jul 2014 21:08
by Jorge Sousa
Hi

Cmon Daniel, send us a small test case please.

Re: TIWCGJQButtonSet Index or Checked?

PostPosted: 25 Jul 2014 21:08
by Jorge Sousa
Hi

Cmon Daniel, send us a small test case please.

Re: TIWCGJQButtonSet Index or Checked?

PostPosted: 25 Jul 2014 21:33
by dfields
All I did was change the button types on your form, but here is an example showing the problems.