Felipe Monteiro de Carvalho wrote:
On 12/3/05, João Paulo Schwarz Schuler <[EMAIL PROTECTED]> wrote:

Hi. This is my first day here. (my English is poor). I am very well
impressed with Lazarus.


Welcome. Good to hear you liked the project =)


So, I compiled this same program on Lazarus (Linux). On that time, I saw all
my labels were on a new size (new font). Exists a way on getting labels with
the same size on Linux and Windows?

I do not like the idea on using Windows fonts on Linux. I prefer to use open
fonts on Windows.


You can add initialization code, perhaps on the create event of the
form, and circle throught all labels changing their font property
acording to the platform. Then you need to choose one font and
font-size for Windows and another for Linux.

You can create a conditional compile to choose the font like this:

{$IFDEF Win32}
  Execute code to change the fonts to windows defaults
{$ELSE}
  Execute code to change the fonts to Linux defaults
{$ENDIF}

Does anyone know how to access all the components witch are owned by the window?

Example:

if (Form1.ComponentCount > 0) then
 begin
  for i:=0 to Form1.ComponentCount-1 do
   begin
    if (Form1.Components[i] is TControl) then
     begin
      with (Form1.Components[i] as TControl) do
       begin
        with Font do
         begin
          Color := clBlack;
          Size := 12;
         end;//Done with Font
       end;//Done with
     end;//End if
   end;//End for-loop
 end;//End if

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to