Removing the dashed line when a table is active.

General TRichView support forum. Please post your questions here
Post Reply
janlund
Posts: 3
Joined: Fri May 26, 2006 7:39 am

Removing the dashed line when a table is active.

Post 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
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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)
janlund
Posts: 3
Joined: Fri May 26, 2006 7:39 am

Post 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
Michel
Posts: 92
Joined: Fri Oct 14, 2005 2:56 pm
Contact:

Post by Michel »

Hi,
Try toggling rvtoHideGridLines in TRVTableItemInfo.Options. This works on a per-table basis.
HTH,
Michel
janlund
Posts: 3
Joined: Fri May 26, 2006 7:39 am

Post 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
Post Reply