Jump to content

UnimMemo with rounded corners and without frame


likemike

Recommended Posts

Hello!

I'm wondering how to get a TunimMemo with rounded corners and without frame.

I've tried this:

            unimMemo.JSInterface.JSCode(#1'.bodyElement.dom.style.setProperty("border-radius","20px");');
            unimMemo.JSInterface.JSCode(#1'.bodyElement.setStyle("border-radius","20px");');

The result is a frame, which has a nice rounded corner and the text area with a different and smaller angle. 

snap.jpg.b00e6536085f33d41fbfc194d7ab3c14.jpg

So I don't need a frame, but the text area with higher degrees of rounding.

Another question: Is it possible to get TUnimMemo transparent? 

Regards

Mike

Link to comment
Share on other sites

Hello,

7 hours ago, likemike said:

I'm wondering how to get a TunimMemo with rounded corners and without frame.

One possible solution:

7 hours ago, likemike said:
//unimMemo.JSInterface.JSCode(#1'.bodyElement.dom.style.setProperty("border-radius","20px");');
//unimMemo.JSInterface.JSCode(#1'.bodyElement.setStyle("border-radius","20px");');
function painted(sender, eOpts)
{
    sender.inputWrapElement.setStyle('border-radius', '20px');
    sender.inputWrapElement.setStyle('border-color', 'green');
}

 

Link to comment
Share on other sites

Thx Sherzod, but I've forgot to mention, that the UnimMemo are created during runtime. I've tried this, but it has no effect:

            s:= 'painted=function painted(e, eOpts)'#13#10 +
            '{ e.inputWrapElement.setStyle("border-radius", "20px"); '#13#10 +
            '  e.inputWrapElement.setStyle("border-color", "clGreen"); } ';
            unimMemo.ClientEvents.ExtEvents.Add(s);

 

Link to comment
Share on other sites

41 minutes ago, likemike said:

that the UnimMemo are created during runtime

Also try this approach:

  with TUnimMemo.Create(Self) do
  begin
    Parent := Self;
    JSInterface.JSAddListener('painted', 'function(){this.inputWrapElement.setStyle("border-radius", "20px"); this.inputWrapElement.setStyle("border-color", "green");}')
  end;

 

Link to comment
Share on other sites

×
×
  • Create New...