powergov Posted October 4, 2018 Share Posted October 4, 2018 Hi, How to add a background-img to panel? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted October 6, 2018 Share Posted October 6, 2018 Hi You can use this code. procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniPanel2, JSInterface do begin JSAddListener('afterrender', JSFunction('sender','sender.body.dom.style.backgroundImage="url(\"files/images/print-01.jpg\")";')); end; end; Quote Link to comment Share on other sites More sharing options...
55143681 Posted October 7, 2018 Share Posted October 7, 2018 23 hours ago, Hayri ASLAN said: Hi You can use this code. procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniPanel2, JSInterface do begin JSAddListener('afterrender', JSFunction('sender','sender.body.dom.style.backgroundImage="url(\"files/images/print-01.jpg\")";')); end; end; For c++ user: void __fastcall TMainForm::UniFormCreate(TObject *Sender) { UniPanel1->JSInterface->JSAddListener("afterrender", UniPanel1->JSInterface->JSFunction("sender","sender.body.dom.style.backgroundImage=\"url(files/images/2018-10-07_080354.png)\";")); } //--------------------------------------------------------------------------- Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.