Re: Grids ?
- From: "alanglloyd@xxxxxxx" <alanglloyd@xxxxxxx>
- Date: 18 Nov 2006 03:59:18 -0800
On Nov 18, 9:23 am, "FrancoJommi" <franco.jo...@xxxxxx> wrote:
Yes,thanks I am trying, but while I found how to change colors, I cannotTypically (with some alternatives) ...
find how to align my strings (which in fact are numbers). Is there some API
call or something else ?
with StringGrid1 do begin
if (ACol = 0) then begin
// if (ACol in [2,4,6..8]) then begin
// if (ARow = 0 then begin) // header row
Canvas.Font.Name := 'Arial';
Canvas.Font.Size := 12;
Canvas.FillRect(ARect);
DrawText(Canvas.Handle, PChar(Cells[ACol, ARow]), -1, ARect,
DT_CENTER or DT_VCENTER or DT_SINGLELINE);
// DrawText(Canvas.Handle, PChar(Cells[ACol, ARow]), -1, ARect,
// DT_RIGHT or DT_VCENTER or DT_SINGLELINE);
// DrawText(Canvas.Handle, PChar(Cells[ACol, ARow]), -1, ARect,
// DT_LEFTT or DT_VCENTER or DT_SINGLELINE);
end;
DrawText() is a WinAPI call - look in Delphi Win32 help or on MSDN
(Microsoft Developers Network) web-site, or get a library edition of
MSDN (best £120 I ever spent).
Alan Lloyd
.
- Follow-Ups:
- Re: Grids ?
- From: FrancoJommi
- Re: Grids ?
- References:
- Grids ?
- From: FrancoJommi
- Re: Grids ?
- From: Heinrich Wolf
- Re: Grids ?
- From: FrancoJommi
- Grids ?
- Prev by Date: Re: Access violation for TWebBrowser: fixes didn't work at all
- Next by Date: Re: Grids ?
- Previous by thread: Re: Grids ?
- Next by thread: Re: Grids ?
- Index(es):
Relevant Pages
|