On Mon, 15 Aug 2005 17:55:34 -0400
Tony Maro <[EMAIL PROTECTED]> wrote:

> Tony Maro wrote:
> 
> > I'm just using the default settings on a TListBox that I'm custom 
> > drawing the text into...
> >
> > On most computers it looks wonderful.  I find that on some computers 
> > (on Win32) the font is 3x normal size and doesn't fit quite right.
> >
> > So how does a TListBox (or any other control for that matter) 
> > determine what font to use?
> 
> Sorry for HTML but made formatting easier.
> 
> To clarify, I'm doing this:
> 
> With LstRoutes do begin
>     {$ifdef win32}
>        // what should I do here?
>     {$else}
>     //Canvas.Font.Name := 
> '-*-helvetica-medium-r-normal-*-*-100-*-*-*-*-iso8859-1'; // was 120
>     Canvas.Font.Name := 'default';
>     Canvas.Font.Pitch := fpDefault;
>     {$endif}

'default' and 'fpDefault' should be the right way. They are the most
portable font settings, because they are at the same time the least
specific.
Why they do not work under windows, I don't know.


>     if selected[Index] then begin
>       Canvas.Brush.Color := clHighlight;
>       Canvas.Font.Color := clWindow;
>     end else begin
>       Canvas.Brush.Color := clWindow;
>       Canvas.Font.Color := clWindowText;
>     end;
>     // draw the background
>     Canvas.FillRect(ARect);
>     MyRecord := PRouteCache(Items.Objects[Index]);
> 
>     Canvas.TextOut(ARect.Left + 2, ARect.Top+2, MyRecord^.Date);
> ...


Mattias

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

Reply via email to