TStringGrid with odd cell layout


2005-04-05 04:29:32 PM
cppbuilder4
Hi,
A days ago i asked for help in order to draw a cell layout with
TstringGrid, then, Gambit kindly replied and he was very helpful
indeed, his code worked with almost no change. Right now i need to
draw a different cell layout and i'm clueless. The draw looks like
this (i hope it's displayed correctly):
____________ _____________
| | | |
| | | |
| | | |
| | | |
| _|_|_ |
|__________| |___________|
__________| 173 |___________
| |_ _ _| |
| | | |
| | | |
| | | |
| | | |
|____________| |_____________|
Here there are five cells, the outer cells parallels those of the
StringGrid, there's some code to draw the white boundaries but the
weird thing is the fifth cell, it's centered among the other four
cells, had that fifth cell only needed to be drawn, i could handle it,
but it needs some data to be displayed. I came up with two solutions:
display the data in the first cell.
____________ _____________
| | | |
| | | |
| | | |
| | | |
| _|_|_ |
|__________|173 |___________|
__________| |___________
| |_ _ _| |
| | | |
| | | |
| | | |
| | | |
|____________| |_____________|
Now there are only four "logical" cells, but it's awkward and ugly.
The second solution consists on using two stringGrids rather than one,
the first would embed the outer cells whereas the other would display
the centered cell. But i don't know if i could skip between the two
stringrids so that the two layouts are visible.
Any hint would be really appreciated, thanks for your time.
David.