 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Warwick Guest
|
Posted: Sun Dec 07, 2003 11:06 pm Post subject: TCustomGrid - DrawCell Issue |
|
|
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
|
Posted: Tue Dec 09, 2003 5:53 am Post subject: Re: TCustomGrid - DrawCell Issue |
|
|
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 |
|
 |
|
|
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
|
|