 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
LMario Guest
|
Posted: Fri Feb 10, 2006 9:03 am Post subject: StringGrid |
|
|
How can I join cells in a TStringGrid, i.e. removing the grid lines between
some of the cells? I am using CBuilder 2006.
Thanks |
|
| Back to top |
|
 |
JD Guest
|
Posted: Fri Feb 10, 2006 11:03 am Post subject: Re: StringGrid |
|
|
"LMario" <lefalme (AT) prodigy (DOT) net.mx> wrote:
| Quote: |
How can I join cells in a TStringGrid, i.e. removing the
grid lines between some of the cells?
|
Set the grid's DefaultDrawing property to false and add an
OnDrawCell event.
If you move into the Object Inspector and enter that event and
press F1, there should be an example (at least there was with
BCB6). Otherwise, search the archives:
http://www.tamaracka.com/search.htm
Once you get the event properly painting the grid, then you
need to check the ACol parameter. For example, if you want to
join column's 2 and 3, you would only need to act on detecting
either column 2 *or* column 3.
Another parameter to the event is a TRect that bounds the cell
that's being drawn. You can extend that Rect to the left or to
the right so that when you call TCanvas::FillRect, the grid
line will be painted over.
~ JD |
|
| 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
|
|