RB15
Hi,
the new tablegrid is a fantastic improvement, nevertheless I have some
questions/problems/thoughts.
1) Is there a way to adjust columwidth/cellwidth by code?
2) the stretch-property dosn't work for me with tablerows
3) I have defined one tablerow in detailband with many records.
In this scenario the horizontal line between the record are thicker
than the other lines (bottomline and topline come together)
4) How can I change the Cell.brush.color depending on a certain
dataset-value
5) it would be very nice to be able to switch off the borderlines for
the whole tablegrid
6) a new tablegrid seems to have always two rows (3 x 2). At least in
the detailband, I think mostly only one row is needed
7) if I enlarge the width of a cell the right edge of the rightmost
cell could move beyond the reportspace. In this case, it seems there is
no 'handle' to reduce the width of the rightmost cell.
Best regards,
Josef Gschwendtner
This discussion has been closed.
Comments
TppTableColumn, TppTableCell. There is a good overview there of mouse
actions that can be performed in the designer as well as properties and
methods for modifying a grid via code
1) Is there a way to adjust columwidth/cellwidth by code?
To modify the column width via code use
myTableGrid.Cols[ColIndex].Width :=
Cell width is read-only and returns the same value as the column width.
myTableGrid.Cols[ColIndex].Cells[RowIndex].Width
or
myTableGrid.Cells[RowIndex, ColIndex].Width
or
myTableGrid.Rows[RowIndex].Cells[ColIndex].Width
2) the stretch-property dosn't work for me with tablerows
I tried a simple test here. Placed a DBMemo in a grid and set the
DBMemo.Stretch to True. Doing this will automatically set the Row.Stretch to
True. In my test here it works.
3) I have defined one tablerow in detailband with many records.
In this scenario the horizontal line between the record are thicker
than the other lines (bottomline and topline come together)
This is a known effect that needs an elegant solution. What is happening is
that detail band 1 is rendered, which includes the bottom border of row 1
and then the page print position is advanced for detail band 2, which
renders the top border for row 2. (Increasing the border width makes it look
even worse.) A work around is to set the DetailBand.BottomOffset to a
negative number so the detail band print position does increment quite so
much. However, this is not great solution, still trying to come up with one.
4. How can I change the Cell.brush.color depending on a certain
dataset-value
You can use the Cell.OnPrint event to implement something like this..
if biolife['Species No'] = 90020 then
TableCell1.Brush.Color := clRed
else
TableCell1.Brush.Color := clWhite;
5) it would be very nice to be able to switch off the borderlines for
the whole tablegrid
Ok, will add that to the list.
Currently what you can do is use Shift+Click on each cell to multi-select
and then use the Border palette on the toolbar to turn off the borders.
6) a new tablegrid seems to have always two rows (3 x 2). At least in
the detailband, I think mostly only one row is needed
Thanks for the feedback, will consider this.
7) if I enlarge the width of a cell the right edge of the rightmost
cell could move beyond the reportspace. In this case, it seems there is
no 'handle' to reduce the width of the rightmost cell.
Thanks, will add that to the list. One possible work around is to select the
TableGrid in the report tree and then adjusts Width, this will shrink all
columns by an equal amount.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
thank you for this detailed answer.
The helpfile in my RB15 installation did not contain TppTableGid.
I think it is RB14 help.
I think I do understand the stretch-property of tablerows better, now.
The height of the tablerow does not go below the value in the
height-property.
This seems to be a different behavior then normal (but maybe the
correct one?). I would say that it would be more RBuilder-like to let
flow the height below the value in the height-property and have a new
property "MinHeight".
Also I realized that the padding is added to calculate the height of
the tablerow.
Regards,
Josef
--
RB 15 includes updated Help2, but Delphi 7 uses the old WinHelp and that did
not get in there. I just updated the web page below with RB 15 WinHelp. (We
still need to update this page for HTML Help, will be doing that as soon as
we can).
http://digital-metaphors.com/download/online_help.html
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com