Re: TZF - TzGrid - Color of Current Row
"Chris Johnson (USA)" <[email protected]> Sun, 13 Jul 2003 15:38:18 -0400
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
The following will change the row color if the boolean field
AddressMailList is True.
HTH,
Chris Johnson USA
-----------------------------------------------------------
procedure TfmMain.DBGridTopDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
with (Sender as TDBGrid).Canvas do
begin
if dm.tblAddressMailList.AsBoolean = True then
begin
Brush.Color := clBlue;
Font.Color := clWhite;
end;
dbGridTop.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
end;
-----------------------------------------------------------
On Sun, 13 Jul 2003 20:42:05 +0200, b.evers <[email protected]> wrote:
> Bob,
>
> Look at the ownerdraw of the grid. It is very powerfull. I use it a lot,
> even to mark certain fields with different colors.
>
> Benno
>
> ----- Original Message ----- From: [email protected] To:
> [email protected] Sent: Sunday, July 13, 2003 8:04 PM
> Subject: Re: TZF - TzGrid - Color of Current Row
>
>
>
> Thanks - worked fine. I wonder if you can change the
> color of that selected row? Bob
>
>
> In a message dated 07/13/2003 7:00:02 AM Eastern Standard Time, abi@i-
> cable.com writes:
>
>
>
> Hi Bob:
> Just think of a problem in my reply. Sorry for the misleading sentense.
> TzGrid.Options is not a Boolean field. It is a Set of TGridOption. What I
> wanted to tell you in the last email was to set that field in the Object
> inspector to True. If you want to do in codes you need to +[dbRowSelect].
>
> Abi
>
>
>
>
>
>
>
>
--
Chris Johnson
==^================================================================
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]
TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
==^================================================================