BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TCustomGrid - DrawCell Issue

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development)
View previous topic :: View next topic  
Author Message
Warwick
Guest





PostPosted: Sun Dec 07, 2003 11:06 pm    Post subject: TCustomGrid - DrawCell Issue Reply with quote



Hi,

My problem relates to a component I am writing derived from
TCustomGrid.
The component is an LED emulator, and I am finding correct drawing
problematic.

Here is the signature for Draw Cell.

//---------------------------------------------------------------------------
void __fastcall TLED::DrawCell(int ACol, int ARow,
const Types::TRect &ARect, TGridDrawState AState)
{
DrawACell(ARect, OutString[ACol+1];

}
(DrawACell is a switch that takes a char and selects the appropriate
image from a predefined TImageList and draws it into the Rect.)

My question relates to ARect ref.
What size is it in relation to the precise boundaries of the Cell?
It seems to lie inside the Cell by a pixel or two.

So each Panel in my LED has a white border around it.

then I added the following to the constructor

Color = clBlack;
Options = (Options) >> goHorzLine >> goVertLine;
GridLineWidth=0;

but the problem persists.
What I want to do is have each image butt up to the images on each
side of it-or at worse paint all the background black so it cannot be
seen.

TIA
Warwick


Back to top
Warwick
Guest





PostPosted: Tue Dec 09, 2003 5:53 am    Post subject: Re: TCustomGrid - DrawCell Issue Reply with quote



On Mon, 08 Dec 2003 12:06:29 +1300, Warwick <wjcb (AT) shrug (DOT) co.nz> wrote:

Quote:
Hi,

My problem relates to a component I am writing derived from
TCustomGrid.
The component is an LED emulator, and I am finding correct drawing
problematic.

Here is the signature for Draw Cell.

//---------------------------------------------------------------------------
void __fastcall TLED::DrawCell(int ACol, int ARow,
const Types::TRect &ARect, TGridDrawState AState)
{
DrawACell(ARect, OutString[ACol+1];

}
(DrawACell is a switch that takes a char and selects the appropriate
image from a predefined TImageList and draws it into the Rect.)

My question relates to ARect ref.
What size is it in relation to the precise boundaries of the Cell?
It seems to lie inside the Cell by a pixel or two.

So each Panel in my LED has a white border around it.

then I added the following to the constructor

Color = clBlack;
Options = (Options) >> goHorzLine >> goVertLine;
GridLineWidth=0;

but the problem persists.
What I want to do is have each image butt up to the images on each
side of it-or at worse paint all the background black so it cannot be
seen.

TIA
Warwick


Thanks for all the insights offered. :(

I'll start again and inherit from a TImage and create my own cells.
Seems a tad counter productive but it will do the job.

TFN
Warwick






Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.