Jump to content

Recommended Posts

Posted

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

  • Like 5
Posted

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.

  • 5 months later...
Posted

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;

 

  • Like 2
  • 4 months later...
Posted
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.

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