Jump to content

How to make TUnimradio checked by default


Dudi Heryadi

Recommended Posts

Hi,

How to make TUnimradio checked by default without have to tap on it?

I already set property checked=true and also put command UnimRadio1.checked := true on form oncreate, but still doesn't work.

I also already changed theme, but nothing works.

can someone help?  

Best Regards

 

Link to comment
Share on other sites

  • 1 year later...

Hi,

I'm trying to build a custom radiogroup component with multiple TUnimRadio inside, I want the first radio btn checked but setting the checked property is still not working, the suggested approach doesn't works on constructor ("Interface not supported" when I try to use the component at design time), can someone help me?

Thanks,

Andrea 

(uniGUI Complete - Professional Edition - Version:1.90.0 build 1511)

Link to comment
Share on other sites

On 10/28/2019 at 8:40 PM, Andrea Franco said:

I'm trying to build a custom radiogroup component with multiple TUnimRadio inside, I want the first radio btn checked but setting the checked property is still not working, the suggested approach doesn't works on constructor ("Interface not supported" when I try to use the component at design time), can someone help me?

Can you make a simple testcase for this?

Link to comment
Share on other sites

21 hours ago, Andrea Franco said:

Something like this.

Andrea

RadioGroupTest.pas

Try this:

 type
  TRadioGroupTest = class(TUnimContainerPanel)
  private
    FRadio1: TUnimRadio;
    FRadio2: TUnimRadio;
  protected
    procedure LoadCompleted; override; //<-----

...
  
procedure TRadioGroupTest.LoadCompleted;
begin
  inherited;

  FRadio1.JSInterface.JSCall('check', [True]);
end;

 

Link to comment
Share on other sites

  • 1 year later...
2 hours ago, Mehmet Emin said:

As of today this problem still exists.

Although your solution solves the issue I don't want to call JS function everytime I use a radio button.

Do we need to reopen a bug report for this?

I opened a ticket.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...