likemike Posted June 15, 2022 Share Posted June 15, 2022 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. 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 More sharing options...
Sherzod Posted June 16, 2022 Share Posted June 16, 2022 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 More sharing options...
likemike Posted June 16, 2022 Author Share Posted June 16, 2022 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 More sharing options...
Sherzod Posted June 16, 2022 Share Posted June 16, 2022 Hello, I will check. Link to comment Share on other sites More sharing options...
Sherzod Posted June 16, 2022 Share Posted June 16, 2022 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 More sharing options...
likemike Posted June 16, 2022 Author Share Posted June 16, 2022 Hello! Thx - it works, but as u see, the text area doesn't match with the border angle: So I need a JS snipet to change the text area border angle too. Best regards Link to comment Share on other sites More sharing options...
Sherzod Posted June 16, 2022 Share Posted June 16, 2022 2 minutes ago, likemike said: I couldn't reproduce. Make a simple testcase to check. Link to comment Share on other sites More sharing options...
likemike Posted June 16, 2022 Author Share Posted June 16, 2022 Hmmm... I've tried to create a testcase - but there it works. I can't found any css or script which causes that - I'll search. Thx. Link to comment Share on other sites More sharing options...
Recommended Posts