Jump to content

TUniDBRadioGroup Color


dkeene

Recommended Posts

Hello

I am able to change the "Color" property of a TUniDBRadioGroup during design time. When I try to change during Run TIme, I get an

error: O4B2.setFieldStyle("background-color:#0000FF;background-image:none");

Am I doing something wrong?
Thank you

Douglas

Link to comment
Share on other sites

2 hours ago, dkeene said:

TUniDBRadioGroup and TUniRadioGroup have propery Color, at design time it can be set to anything.snap058.bmp

Workaround:

Uses ..., UniGUIJSUtils;

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  with UniRadioGroup1 do
    JSInterface.JSAddListener('afterrender', 'function(){this.setStyle("background-color", "' + uniColor2Web(Color) + '")}');
  
end;

 

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...