Tim Posted March 9, 2018 Share Posted March 9, 2018 Hello, I have a modal resizeable form in my project which looks like this: I would like to change the color of the title bar and borders so it looks something like this: The text in the title bar should also be changed to black. I've been struggling to find a comprehensive answer in this forum (the fact that "border" and "color" are apparently banned words in the forum search doesn't help). For example, i tried the technique in the following post: http://forums.unigui.com/index.php?/topic/3799-form-border-color-change/&do=findComment&comment=49474 Which only affects the title bar: Then i tried the technique in the following post: http://forums.unigui.com/index.php?/topic/3799-form-border-color-change/&do=findComment&comment=49473 With the following result: Any suggestions? Many thanks Tim Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 9, 2018 Share Posted March 9, 2018 Hi, Which build are you using ?! Quote Link to comment Share on other sites More sharing options...
Tim Posted March 9, 2018 Author Share Posted March 9, 2018 Sorry, it's UniGui v1.0.0.1422 and Delphi 10.2 Update 1 on Windows 8.1. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted March 10, 2018 Share Posted March 10, 2018 Hi Please add this to onCreate of Form. with WebForm.JSInterface do begin JSAddListener('afterrender', JSFunction('sender','var me=sender; '+ 'me.header.el.setStyle({"background-color": "green"}); '+ 'me.header.el.setStyle({"background-image": "none"}); '+ 'me.header.titleCmp.el.setStyle({"color": "black"}); '+ 'me.el.setStyle({"border": "solid 3px green"}); '+ 'me.el.setStyle({"background-color": "green"});')); JSConfig('baseCls', ['x-panel']); end; 1 Quote Link to comment Share on other sites More sharing options...
Tim Posted March 11, 2018 Author Share Posted March 11, 2018 Thanks, it works perfectly! 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.