Hello Sergey,
I have written to you for a few days about a possibility to fix memo-table-cell-border-lines, so that user can't resize them ?
Background: If I work quick I often have changed col.width if I mark something in a cell.
My solutions doesn't work, if I click direct on a cell-border-line. If I click 1 (or 2 pixel) beneath cell-border-line all ok.
What can I do that memo-table-cell-border-lines can't be resized ?
Best regards,
Jürgen
procedure TForm1.memoRVMouseDown(Sender: TCustomRichView; Button: TMouseButton; Shift: TShiftState; ItemNo, X, Y: Integer);
begin
if memo.GetCurrentItemEx(TRVTableItemInfo, rve, TCustomRVItemInfo(rveTable)) then begin
//ColRowResize is a menuItem where I allow user to change (or not to change) resizing
if ColRowResize.checked=true then rveTable.Options:=
rveTable.Options-[rvtoRowSizing,rvtoColSizing]
else rveTable.Options:=rveTable.Options+[rvtoRowSizing,rvtoColSizing];
end;
end;
fix memo-table-cell-border-lines
Hello Sergey,
I have looked in your rvTable.pas.
There I have found
const
RVTABLEDEFAULTOPTIONS = [rvtoEditing, rvtoRowSizing, rvtoColSizing, rvtoRowSelect, rvtoColSelect];
If I delete rvtoRowSizing and rvtoColSizing all runs as I want it.
But I want manage it about a menuItem.
How can I use RVTABLEDEFAULTOPTIONS sometimes with rvtoRowSizing and rvtoColSizing and sometimes without rvtoRowSizing and rvtoColSizing (in my first mail I noticed a problem by using rveTable.Options:=rveTable.Options-[rvtoRowSizing,rvtoColSizing]).
Jürgen
I have looked in your rvTable.pas.
There I have found
const
RVTABLEDEFAULTOPTIONS = [rvtoEditing, rvtoRowSizing, rvtoColSizing, rvtoRowSelect, rvtoColSelect];
If I delete rvtoRowSizing and rvtoColSizing all runs as I want it.
But I want manage it about a menuItem.
How can I use RVTABLEDEFAULTOPTIONS sometimes with rvtoRowSizing and rvtoColSizing and sometimes without rvtoRowSizing and rvtoColSizing (in my first mail I noticed a problem by using rveTable.Options:=rveTable.Options-[rvtoRowSizing,rvtoColSizing]).
Jürgen
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hello Sergey,
thanks for your information.
I think as you (It's not a good idea to modify source code).
I have tried many times to solve my problem and I think that the best way is to set RVTABLEDEFAULTOPTIONS without rvtoRowSizing, rvtoColSizing because user can't destroy a good built table by unconcentrated working. If user want to resize col (or row) he must do it fully aware of importance.
Can you think about the problem a) of resizing col/row by unconcentrated working and b) about the matter of resizing cols/rows (isn't it a aware of importance ?).
If you think so too, isn't it better to set RVTABLEDEFAULTOPTIONS without rvtoRowSizing, rvtoColSizing (in rvTABLE.PAS) and to work with a menuItem (or button) to change TRVTableItemInfo.options ?
The background for my question ist that I don't want to change your code because I have to change RVTABLEDEFAULTOPTIONS with every rvTable.pas-update (and I hope that I don't forget it).
Jürgen
{
procedure TForm1.ColRowResizeClick(Sender: TObject);
begin //ColRowResize.caption:='Zeilen/Spalten NICHT per Maus vergößern können';
if (memo.CanChange) and (memo.GetCurrentItemEx(TRVTableItemInfo, rve,
TCustomRVItemInfo(rveTable))) then begin
if rvtoColSizing in rveTable.Options then begin
ColRowResize.checked:=true;
rveTable.Options:=rveTable.Options-[rvtoRowSizing,rvtoColSizing];
end else begin
ColRowResize.checked:=false;
rveTable.Options:=rveTable.Options+[rvtoRowSizing,rvtoColSizing];
end;
memo.change;
end;
}
thanks for your information.
I think as you (It's not a good idea to modify source code).
I have tried many times to solve my problem and I think that the best way is to set RVTABLEDEFAULTOPTIONS without rvtoRowSizing, rvtoColSizing because user can't destroy a good built table by unconcentrated working. If user want to resize col (or row) he must do it fully aware of importance.
Can you think about the problem a) of resizing col/row by unconcentrated working and b) about the matter of resizing cols/rows (isn't it a aware of importance ?).
If you think so too, isn't it better to set RVTABLEDEFAULTOPTIONS without rvtoRowSizing, rvtoColSizing (in rvTABLE.PAS) and to work with a menuItem (or button) to change TRVTableItemInfo.options ?
The background for my question ist that I don't want to change your code because I have to change RVTABLEDEFAULTOPTIONS with every rvTable.pas-update (and I hope that I don't forget it).
Jürgen
{
procedure TForm1.ColRowResizeClick(Sender: TObject);
begin //ColRowResize.caption:='Zeilen/Spalten NICHT per Maus vergößern können';
if (memo.CanChange) and (memo.GetCurrentItemEx(TRVTableItemInfo, rve,
TCustomRVItemInfo(rveTable))) then begin
if rvtoColSizing in rveTable.Options then begin
ColRowResize.checked:=true;
rveTable.Options:=rveTable.Options-[rvtoRowSizing,rvtoColSizing];
end else begin
ColRowResize.checked:=false;
rveTable.Options:=rveTable.Options+[rvtoRowSizing,rvtoColSizing];
end;
memo.change;
end;
}
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: