Jump to content

How to make TUnimradio checked by default


Dudi Heryadi

Recommended Posts

  • 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...