Abaksoft Posted April 1, 2020 Share Posted April 1, 2020 Hello everybody, It should be noted that Unigui has today reached great maturity. Many very useful properties are included, but they remain unknown and not obvious. Today, it is almost impossible to remember everything. This is why I appeal to all the members of our dear community to make small very simple and useful samples which will serve as references (Memory Help). Here is for my part, this little example for CSS. it follows from the forum (many thanks to Sherzod alias DD the Maestro). I count on you to post more ... Thank you Custom_CSS.zip 5 Link to comment Share on other sites More sharing options...
Sherzod Posted April 2, 2020 Share Posted April 2, 2020 Thank you for your contribution! Link to comment Share on other sites More sharing options...
Norm Posted April 2, 2020 Share Posted April 2, 2020 Can you explain please. I have compiled your sample code and it behaves as you explained. However I don't see anything in ServerModule-> CustomeCSS. It is blank. Link to comment Share on other sites More sharing options...
Norm Posted April 2, 2020 Share Posted April 2, 2020 Solved! Please ignore my previous post. I just noticed the the CustomCSS content is created by ServerModule->OnCreate Link to comment Share on other sites More sharing options...
Abaksoft Posted April 3, 2020 Author Share Posted April 3, 2020 Hello, As LayoutConfig.Cls property is Protected, Sherzod suggested a way to Change Cls at runtime. See below updated : Custom_Css2.zip Custom_CSS2.zip 3 1 Link to comment Share on other sites More sharing options...
Sherzod Posted April 3, 2020 Share Posted April 3, 2020 Thanks Link to comment Share on other sites More sharing options...
billyChou Posted September 25, 2020 Share Posted September 25, 2020 Thanks Link to comment Share on other sites More sharing options...
x11 Posted September 25, 2020 Share Posted September 25, 2020 Thank you. But... In my humble opinion, it seems to me that it is wrong to teach programmers to insert the CSS code into an exe file. It seems to me that this is more correct: procedure TUniMainModule.LoadScriptCSS; begin if upMobile in UniMainModule.UniPlatforms then UniSession.AddJS('Ext.Loader.loadScript("/files/css/custommob.css")'); if upDesktop in UniMainModule.UniPlatforms then UniSession.AddJS('Ext.Loader.loadScript("/files/css/custom.css")'); end; procedure TUniMainModule.UniGUIMainModuleBeforeLogin(Sender: TObject; var Handled: Boolean); begin LoadScriptCSS; end; 2 Link to comment Share on other sites More sharing options...
João Posted January 30, 2021 Share Posted January 30, 2021 Good. Link to comment Share on other sites More sharing options...
João Posted January 30, 2021 Share Posted January 30, 2021 On 4/3/2020 at 12:18 PM, Abaksoft said: Hello, As LayoutConfig.Cls property is Protected, Sherzod suggested a way to Change Cls at runtime. See below updated : Custom_Css2.zip Custom_CSS2.zip Can you post the file again? The link was not found. Link to comment Share on other sites More sharing options...
Sherzod Posted January 30, 2021 Share Posted January 30, 2021 Just now, João said: Can you post the file again? The link was not found. Hello, Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now