Jump to content

How to change color of UniPanel in JS


MVakili

Recommended Posts

Base on another topic I change the color of unibitbtn

UniBitBtn1.JSInterface.JSCall('btnWrap.setStyle', ['background-image', 'linear-gradient(to right, Cornsilk, DarkKhaki)']);

image.png.3624970606774f1d58144448dabc7f49.png
 

now I want to change another component like UniPanel UniDbGrid unicheckBox and so on 

for example is it correct for UniPanel1

unipanel1.JSInterface.JSCall('pnlWrap.setStyle', ['background-image', 'linear-gradient(to right, Cornsilk, DarkKhaki)']);

 

Link to comment
Share on other sites

44 minutes ago, MVakili said:

for example is it correct for UniPanel1?


unipanel1.JSInterface.JSCall('pnlWrap.setStyle', ['background-image', 'linear-gradient(to right, Cornsilk, DarkKhaki)']);
UniPanel1.JSInterface.JSCall('setBodyStyle', ['background-image', 'linear-gradient(to right, Cornsilk, DarkKhaki)']);

 

Link to comment
Share on other sites

procedure TJRBForm.UniFormShow(Sender: TObject);
begin
   with UniPanel1.JSInterface do
    begin
      JSCall('btnWrap.setStyle', ['background-image', 'linear-gradient(to right, Cornsilk, DarkKhaki)']);
    end;
   UniPanel1.JSInterface.JSCall('setbodystyle', ['background-image', 'linear-gradient(to right, Cornsilk, DarkKhaki)']);

 

Link to comment
Share on other sites

sorry

it was my fault , your code works

procedure TJRBForm.UniFormShow(Sender: TObject);
begin
//   with UniBitBtn1.JSInterface do
//    begin
//      JSCall('btnWrap.setStyle', ['background-image', 'linear-gradient(to right, Cornsilk, DarkKhaki)']);
//    end;
  UniPanel1.JSInterface.JSCall('setBodyStyle', ['background-image', 'linear-gradient(to right, Cornsilk, DarkKhaki)']);
end;

is it for change of command?

setbodystyle

setBodyStyle

Link to comment
Share on other sites

I wrote a testcase for you 

but here everything is ok !!!!!!!!!!!!!

I will check my project again 

but 2 question 

1- how I can transparent for example a checkbox 

2- how I can change color (or transparent) behind of data in UniDbGrid in testcase

 

Test.rar

Link to comment
Share on other sites

  • 2 weeks later...

I dont know 

one of this theme 

image.png.573c2603a4beef3b96f6350b3222a49d.png

if it important  ,I can find it for you later

here the real page 

I change unipanel color as you told me (

UniPanel1.JSInterface.JSCall('setBodyStyle', ['background-image', 'linear-gradient(to top, ......., .......)']);

)

but i have problem in unidbgrid and unipagecontrol

image.png.6ce098de5be0eab2f24340f66885daa1.png

 

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