Dinkin Posted October 10, 2023 Share Posted October 10, 2023 Hi! Can Awesome items be displayed in UniImage? 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 10, 2023 Share Posted October 10, 2023 2 hours ago, Dinkin said: Can Awesome items be displayed in UniImage? Hello, 2 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 10, 2023 Share Posted October 10, 2023 procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniImage1 do begin //JSInterface.JSConfig('cls', ['x-fa fa-heart']); // or JSInterface.JSConfig('cls', [UniNativeImageList1.GetImageIconCls(1)]); // color optional // the remaining two properties must be specified JSInterface.JSAddListener('afterrender', 'function(me){me.setStyle("color", "red"); me.setStyle("line-height", "'+ Height.ToString() +'px"); me.setStyle("font-size", "'+ Height.ToString() +'px")}'); end; end; 2 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 10, 2023 Share Posted October 10, 2023 JSInterface.JSConfig('cls', ['x-fa fa-sync fa-spin']); JSInterface.JSAddListener('afterrender', 'function(me){me.setStyle("color", "red"); me.setStyle("line-height", "'+ Height.ToString() +'px"); me.setStyle("font-size", "'+ Height.ToString() +'px")}'); 3 Quote Link to comment Share on other sites More sharing options...
Dinkin Posted October 10, 2023 Author Share Posted October 10, 2023 Thank!. But I can’t translate this line into in Builder c++ =( JSInterface.JSAddListener('afterrender', 'function(me){me.setStyle("color", "red"); me.setStyle("line-height", "'+ Height.ToString() +'px"); me.setStyle("font-size", "'+ Height.ToString() +'px")}'); Quote Link to comment Share on other sites More sharing options...
Dinkin Posted October 10, 2023 Author Share Posted October 10, 2023 String st = "function(me){me.setStyle(\"color\", \"red\"); me.setStyle(\"line-height\", \"" + IntToStr(32) + "px\"); me.setStyle(\"font-size\", \"" + IntToStr(32) + "px\")}"; UniImage1->JSInterface->JSAddListener(L"afterrender", ARRAYOFCONST(((String)st))); Quote Could not find a match for 'IUniJSInterface::JSAddListener(const wchar_t *,OpenArray<TVarRec>,unsigned int)' 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.