Recent

Author Topic: Defaults.  (Read 1934 times)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Defaults.
« on: July 20, 2017, 02:57:16 pm »
Can any one remind me how do i get the default values for colors and fonts? If for example the form.font.name = default how can I convert it to say segoui 9 in windows? same thing for color.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Defaults.
« Reply #1 on: July 20, 2017, 03:54:00 pm »
The defaults are taken from the widgetset defaults. That is independent of Lazarus but governed by your OS (widgetset) theme and differs across platforms.
In the case of both font and color, you just have to set that once as long parentfont and parentcolor are true.
« Last Edit: July 20, 2017, 03:55:53 pm by Thaddy »
Specialize a type, not a var.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Defaults.
« Reply #2 on: July 20, 2017, 04:08:12 pm »
The defaults are taken from the widgetset defaults. That is independent of Lazarus but governed by your OS (widgetset) theme and differs across platforms.
True and lazarus knows how exactly what colors to use? And it must know because If I set a brush to cldefault eg in a TCustomcontrol descentant I get a black background not a white as it should be in my windows theme.
In the case of both font and color, you just have to set that once as long parentfont and parentcolor are true.
set it to what value? Keep in mind they are already on default.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018