Jump to content

How to make round corner for UniPanel?


55143681

Recommended Posts

 

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

image.thumb.png.21f29ce26173233294dc0876b0d56aa5.png

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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\"}");
}
//---------------------------------------------------------------------------
 

 

Link to comment
Share on other sites

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']");
}

Link to comment
Share on other sites

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.2020-01-29_122853.jpg.5fe021d985dc5561ca5a5f6f89fa3b38.jpg

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\"}";
}
//---------------------------------------------------------------------------

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