[Lazarus] font.name=default

Philippe philippe at quarta.com.br
Sun Aug 24 22:28:25 CEST 2014


 

just for information ... 

I tried to use your suggestion ... it
works ... but ... I am using TGroupBox in TGroupBox in TGroupBox ...


your example just loops on the top level controls of the form ...
needing to use recursive function to go through contained group boxes
... what I´ll do later. 

Philippe 

Em 22.08.2014 10:26, Salvatore
Coppola escreveu: 

> You can choose the controls you want this way 
>

> var i: integer; 
> begin 
> for i:=0 to ControlCount-1 do 
> if
Controls[i] is TButton then 
> ShowMessage(Controls[i].Name); 
> end; 
>
Ciao 
> 
> 2014-08-21 13:09 GMT+02:00 Philippe
<philippe at quarta.com.br>:
> 
>> I wrote about a suggestion ... a Lazarus
default font ... 
>> 
>> may be, as far as I understand, using "Parent
Font" property is the way ... I´ll try it! 
>> 
>> Philippe 
>> 
>> Em
20.08.2014 19:54, Philippe escreveu: 
>> 
>>> thank for your answer.

>>> 
>>> I found the default font on my machine/windows 8 is Segoe UI.
I´ll check if it is avalaible under other version of Windows ... 
>>>

>>> your suggestion (looping controls) is interesting, I didn´t know
it, but will change all the controls of the form ... and that is not
what I need ... I just want to change the Lazarus default. So it will
change the font of controls using font.name [1]='Default' in the
configuration/object inspector. 
>>> 
>>> Philippe 
>>> 
>>> Em
20.08.2014 12:58, Salvatore Coppola escreveu: 
>>> 
>>>> 2014-08-16
12:40 GMT+02:00 Philippe <philippe at quarta.com.br>:
>>>> 
>>>>> I wrote a
program, used font.name [1]=default for allmost everything ... it was
looking as Arial font. Fine. 
>>>>> 
>>>>> It was on a Windows 8
machine. 
>>>>> 
>>>>> Then I copied the program to a Windows XP machine
to check. 
>>>>> 
>>>>> Where static text and others are written with
something looking as a New Times Roman ...
>>>>> and sometimes not
fitting in the field width ... and be splitted! 
>>>>> 
>>>>> I
undestood there is something about windows default font. Googled ... ...
... 
>>>>> 
>>>>> On the my W8 machine default font (from registers) are
Microsoft Sans Serif and Tahoma ... diferent. 
>>>>> 
>>>>> I made a
test. In the attached image, the first text is with default, the second
with Arial, both with bold mode. Arial was the closest font from default
I found ... but still a bit diferent. 
>>>>> 
>>>>> Question 1): which
default font is used with Lazarus ?
>>>> 
>>>> the theme fonts 
>>>>

>>>>> Question 2): is there a way I can set the default font in
Lazarus?
>>>> 
>>>> I don't know if is possible in RAD way, but you can
set the font you want in on create event for each controls you want.

>>>> 
>>>> procedure TForm1.FormCreate(Sender: TObject); 
>>>> var i:
integer; 
>>>> begin 
>>>> for i:=0 to ControlCount-1 do 
>>>>
Controls[i].Font:=YOURFONT; 
>>>> end; 
>>>> 
>>>> Thank for your help

>>>> 
>>>> Philippe 
>>>> 
>>>> PS. F1 in
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [3]
>>>

>>> --
>>> _______________________________________________
>>> Lazarus
mailing list
>>> Lazarus at lists.lazarus.freepascal.org
>>>
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]
>> 
>>
--
>> _______________________________________________
>> Lazarus mailing
list
>> Lazarus at lists.lazarus.freepascal.org
>>
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]
> 
>
--
> _______________________________________________
> Lazarus mailing
list
> Lazarus at lists.lazarus.freepascal.org
>
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]




Links:
------
[1] http://font.name
[2]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[3]
http://webmail.quarta.com.br/<div>

> lto:Lazarus at lists.lazarus.freepascal.org">Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus [2]
> 
> -- _______________________________________________ Lazarus mailing list Lazarus at lists.lazarus.freepascal.org
</div>epascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140824/f1339a83/attachment-0003.html>


More information about the Lazarus mailing list