SetCellVisibleBorders doesn't go
Posted: Sun Nov 20, 2005 9:51 am
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;
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;