Jump to content

Change Default Font Size


Aggie85

Recommended Posts

Howdy All!

Is there an EASY way to change the font size for all TUniLabels / TUniEdits / TUniMemos to use a default font size of 1rem (16px)?

I can write a routine to loop through all the controls on a form, but before I start doing that, I figured I would ask if there is an easier way?

And what is the default font size of 1rem in the Delphi font system?

All the best,

Aggie85

Link to comment
Share on other sites

Hello,

6 hours ago, Aggie85 said:

to use a default font size of 1rem (16px)?

https://www.w3schools.com/cssref/css_units.asp

https://www.sitepoint.com/understanding-and-using-rem-units-in-css/#:~:text=In CSS rem stands for,and spacing throughout your UI.

6 hours ago, Aggie85 said:

And what is the default font size of 1rem in the Delphi font system?

https://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.Forms.TApplication.DefaultFont#Code_Examples

All newly created forms use DefaultFont if the ParentFont property is set to True...

Link to comment
Share on other sites

Sherzod,

I am very familiar with css fonts…my question was pertaining to UniGui / ExtJS if there was a simple way to set the default font rendering size for all edits / labels to 1rem to allow.

From my limited experience with unigui / ExtJS, just applying your own CSS can cause issues with all the framework CSS if you don’t know what you are doing.

So I have been setting the font sizes in the IDE for each control at a size of 9 which is 15px (not quite 1rem).

So is there an easy way in unigui to default all edits / labels / field labels to 1rem or is the aforementioned Parent form DefaultFont the answer?

 

Link to comment
Share on other sites

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