SetCellVisibleBorders doesn't go

General TRichView support forum. Please post your questions here
Post Reply
j&b

SetCellVisibleBorders doesn't go

Post by j&b »

Hello Sergey,

Cellborders stay. What's wrong

procedure TForm1.tabAenderungenClick(Sender: TObject);
var c,r, itemNo,Data, fAbbr: integer;
nWert: array[1..14] of integer;
nText: string;
cb_checked: array[1..14] of bool;
ctrl: TComponent;
begin
if table1.state in [dsEdit, dsInsert] then table1.post;
if (not memo.CanChange) or (not memo.GetCurrentItemEx(TRVTableItemInfo, rve, TCustomRVItemInfo(rveTable))) then begin
ShowMessage('Tabelle hat nicht den Focus.');
exit;
end;
ItemNo := rveTable.GetMyItemNo;
memo.BeginUndoGroup(rvutModifyItem); memo.SetUndoGroupMode(True);
memo.BeginItemModify(ItemNo, Data);

// ...

if (cb_checked[11]=true) or (cb_checked[12]=true) or (cb_checked[13]=true) or (cb_checked[14]=true) then begin

if nWert[11]=1 then cb_checked[11]:=true else cb_checked[11]:=false;
if nWert[12]=1 then cb_checked[12]:=true else cb_checked[12]:=false;
if nWert[13]=1 then cb_checked[13]:=true else cb_checked[13]:=false;
if nWert[14]=1 then cb_checked[14]:=true else cb_checked[14]:=false;

rvetable.SetCellVisibleBorders(cb_checked[11], cb_checked[12], cb_checked[13], cb_checked[14], rveTzeile1, rveTspalte1);

end;

memo.EndItemModify(ItemNo, Data); memo.SetUndoGroupMode(False);
memo.Change;
if table1.state in [dsEdit, dsInsert] then table1.post;
end;
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The similar code works in RichViewActions, so I do not know where the problem is. Try to create a simple project reproducing this problem and send it to me.
Post Reply