Page 1 of 1

Removing the dashed line when a table is active.

Posted: Tue Jun 13, 2006 12:17 pm
by janlund
Hi.

How do i remove the dashed lines that appears when the caret is inside the table (in a TRichViewEdit) ?

BorderWidth and CellBorder widths are set to zero.

(They Disappear as soon as i select somthing else)

Best regards

Jan

Posted: Wed Jun 14, 2006 4:14 pm
by Sergey Tkachenko
Hmm, dashed lines (table grid) should be always displayed, regardless of the caret position.
To remove table grid, set RichViewTableGridStyle := psClear (variable from RVTable unit)

Posted: Thu Jun 15, 2006 8:58 am
by janlund
Thanks Sergey.
It works, however, i wish that i could set this as a property on the table itself instead of a global constant.

The thing is that i have a "hidden" table where each row is corresponding to a record in a DB-table. Now the hidden table/grid shouldn't show at all (it is just a invisible container), but the tables i use inside each cell should be visible.
Hmm, dashed lines (table grid) should be always displayed, regardless of the caret position.
If i click on the TRichViewEdit outside the table (ie. in the bottom of the richviewedit that has no content (or in a non-editable cell), the dashed lines disappears - probably because it is not in edit mode anymore.
However, if i do the same thing on a TDBRichViewEdit they stay.

By a non-editable cell i mean a cell that has been disabled like this :

Code: Select all

procedure TfrmJournalEdit.CellEditing(Sender: TRVTableItemInfo; Row, Col: Integer; Automatic: Boolean; var AllowEdit: Boolean);
begin
  AllowEdit := Row<>0;
end;
I tried to create to properties in TRVTableItemInfo :
RichViewTableGridEditStyle and
RichViewTableGridViewStyle

These are set to the default values (psDot and psClear) in the constructor of TRVTableItemInfo, and then changed the DrawBorder
code to use these accordingly.

(I had to leave the RichViewTableGridStyle constant in RVTables, in order to keep compliance with RichViewActions)

Thanks
Jan

Posted: Thu Jun 15, 2006 12:07 pm
by Michel
Hi,
Try toggling rvtoHideGridLines in TRVTableItemInfo.Options. This works on a per-table basis.
HTH,
Michel

Posted: Fri Jun 16, 2006 5:49 am
by janlund
Thanks Michel.
Michel wrote:Try toggling rvtoHideGridLines in TRVTableItemInfo.Options. This works on a per-table basis.
That was exactly what i was looking for.

Jan