55143681 Posted January 22, 2020 Share Posted January 22, 2020 I dynamic create some UniPanels, How to make round corner for UniPanel? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 22, 2020 Share Posted January 22, 2020 2 hours ago, 55143681 said: How to make round corner for UniPanel? Please see this demo: \FMSoft\Framework\uniGUI\Demos\Desktop\CustomControl-5 Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 23, 2020 Author Share Posted January 23, 2020 21 hours ago, Sherzod said: Please see this demo: \FMSoft\Framework\uniGUI\Demos\Desktop\CustomControl-5 Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 23, 2020 Author Share Posted January 23, 2020 1 minute ago, 55143681 said: unigui1514 don't have UniRoundPanel Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 23, 2020 Share Posted January 23, 2020 1 hour ago, 55143681 said: unigui1514 don't have UniRoundPanel This is a custom control, you must first install it. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted January 23, 2020 Share Posted January 23, 2020 Hi when installling the custom package following errors occures. Where I am going wrong? [dcc32 Fatal Error] uniGUI18.dpk(30): E2225 Never-build package 'rtl' must be recompiled [dcc32 Fatal Error] CustomPack5.dpk(34): E2202 Required package 'uniGUI18' not found Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 23, 2020 Share Posted January 23, 2020 11 minutes ago, MOGSY said: when installling the custom package following errors occures. Where I am going wrong? [dcc32 Fatal Error] uniGUI18.dpk(30): E2225 Never-build package 'rtl' must be recompiled [dcc32 Fatal Error] CustomPack5.dpk(34): E2202 Required package 'uniGUI18' not found Are you using Rad Studio 10.2 Tokyo? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 23, 2020 Share Posted January 23, 2020 Please replace in CustomPack5.dpk: requires rtl, vcl, uniGUI25, uniTools25, uIndy25, vclimg, vclie, VclSmp, vclx, vcldb, dbrtl; Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 27, 2020 Author Share Posted January 27, 2020 On 1/23/2020 at 1:51 PM, Sherzod said: Please replace in CustomPack5.dpk: requires rtl, vcl, uniGUI25, uniTools25, uIndy25, vclimg, vclie, VclSmp, vclx, vcldb, dbrtl; Still have error. Required package uniGUI25 NOT FOUND Quote Link to comment Share on other sites More sharing options...
epos4u Posted January 27, 2020 Share Posted January 27, 2020 delete all the requires with number at the end, like 24 or 25 etc then rebuild, it will add the relevant files, and then install Quote Link to comment Share on other sites More sharing options...
MOGSY Posted January 27, 2020 Share Posted January 27, 2020 Hi Following error occures after deleting and build [dcc32 Error] UniCustomControl1.pas(25): E2037 Declaration of 'InternalSetCaption' differs from previous declaration Quote Link to comment Share on other sites More sharing options...
epos4u Posted January 27, 2020 Share Posted January 27, 2020 not sure what your doing wrong. just did the 4 steps see the images Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 27, 2020 Share Posted January 27, 2020 5 hours ago, MOGSY said: ... Then you can also try with UniPanel: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniPanel1.JSInterface.JSAddListener('afterrender', 'function(){this.body.dom.style.borderRadius="10px"}'); end; Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 28, 2020 Author Share Posted January 28, 2020 15 hours ago, Sherzod said: Then you can also try with UniPanel: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniPanel1.JSInterface.JSAddListener('afterrender', 'function(){this.body.dom.style.borderRadius="10px"}'); end; Works well for static UniPanel, not well for dynamic UniPanel。 Cbuilder code: void __fastcall TMainForm::UniFormCreate(TObject *Sender) { UniPanel1->JSInterface->JSAddListener("afterrender","function(){this.body.dom.style.borderRadius=\"10px\"}"); } //--------------------------------------------------------------------------- Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 28, 2020 Share Posted January 28, 2020 6 minutes ago, 55143681 said: not well for dynamic UniPanel。 I couldn't reproduce. Please clarify. Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 28, 2020 Author Share Posted January 28, 2020 10 hours ago, Sherzod said: I couldn't reproduce. Please clarify. See the Code please,click UniBitBtn1 to see. testPanelC.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 28, 2020 Share Posted January 28, 2020 34 minutes ago, 55143681 said: See the Code please,click UniBitBtn1 to see. Then try to use this code, instead of "afterrender": newCtl.JSInterface.JSCall('setBodyStyle', ['borderRadius', '10px']); Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 28, 2020 Author Share Posted January 28, 2020 5 minutes ago, Sherzod said: Then try to use this code, instead of "afterrender": newCtl.JSInterface.JSCall('setBodyStyle', ['borderRadius', '10px']); have no effect. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 28, 2020 Share Posted January 28, 2020 40 minutes ago, 55143681 said: have no effect. TeamViewer? Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 28, 2020 Author Share Posted January 28, 2020 9 minutes ago, Sherzod said: TeamViewer? I am from china,so far from you and the network is so slow. See the video and the code please. void __fastcall TMainForm::UniBitBtn1Click(TObject *Sender) { P1++; TUniPanel * newCtl=new TUniPanel(this); newCtl->Left=LastX; newCtl->Top=LastY; newCtl->Parent=UniPanelA; newCtl->Caption="UniPanel"+String(P1); newCtl->Name=newCtl->Caption; newCtl->Draggable->Enabled=true; newCtl->Cursor=crDrag; newCtl->OnEndDrag=AnyEndDrag; newCtl->Collapsible=true; newCtl->Collapsed=false; newCtl->CollapseDirection=cdTop; //newCtl->JSInterface->JSAddListener("afterrender","function(){this.body.dom.style.borderRadius=\"10px\"}"); newCtl->JSInterface->JSCall("setBodyStyle", "['borderRadius', '10px']"); } Video_2020-01-28_235731.wmv Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 28, 2020 Share Posted January 28, 2020 Try this: Name := 'testPanel'; //It's necessary ClientEvents.ExtEvents.Values['afterrender'] := 'function(sender){sender.body.dom.style.borderRadius="10px"}'; Quote Link to comment Share on other sites More sharing options...
55143681 Posted January 29, 2020 Author Share Posted January 29, 2020 12 hours ago, Sherzod said: Try this: Name := 'testPanel'; //It's necessary ClientEvents.ExtEvents.Values['afterrender'] := 'function(sender){sender.body.dom.style.borderRadius="10px"}'; work s well ,thanks. the code as follow,see the image please. void __fastcall TMainForm::UniBitBtn1Click(TObject *Sender) { P1++; TUniPanel * newCtl=new TUniPanel(this); newCtl->Left=LastX; newCtl->Top=LastY; newCtl->Parent=UniPanelA; newCtl->Caption="UniPanel"+String(P1); newCtl->Name=newCtl->Caption; newCtl->Draggable->Enabled=true; newCtl->Cursor=crDrag; newCtl->OnEndDrag=AnyEndDrag; newCtl->Collapsible=true; newCtl->Collapsed=false; newCtl->CollapseDirection=cdTop; //newCtl->JSInterface->JSAddListener("afterrender","function(){this.body.dom.style.borderRadius=\"10px\"}"); //newCtl->JSInterface->JSCallDefer("setBodyStyle", "['borderRadius', '10px']",200); newCtl->ClientEvents->ExtEvents->Values["afterrender"]="function(sender){sender.body.dom.style.borderRadius=\"10px\"}"; } //--------------------------------------------------------------------------- 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.