Don't Change Selection if the mouse is down.
Don't hide the grid tools for RO Tables Disable individual methods for RO Tables on the Grid Tool Ribbon and Context Menu (Copy, Paste, Insert, Remove) Don;t allow edit mode if IsRoTable.
This commit is contained in:
parent
a1deb2a0ff
commit
526214e0b5
@ -834,6 +834,7 @@ namespace Volian.Controls.Library
|
||||
OnSetMenu(this, new StepRTBMenuEventArgs(inPsi?"PSI":"OpenContextMenu"));
|
||||
_ContextMenuStripChanged = false;
|
||||
CorrectSelectionAtEndOfLine();
|
||||
_MouseDown = true;
|
||||
}
|
||||
void StepRTB_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
@ -1512,6 +1513,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
private void HandleSelectionChange()
|
||||
{
|
||||
if (_MouseDown) return;
|
||||
if (_HandlingCtrlA) return;
|
||||
if (!_HandlingCtrlA && this.TextLength == this.SelectionLength && this.SelectedRtf.EndsWith("\\par\r\n}\r\n"))
|
||||
{
|
||||
|
@ -1292,7 +1292,7 @@ namespace Volian.Controls.Library
|
||||
btnTblDgnAdjustSize.Checked = false;
|
||||
ToggleTableDesignButtons(true);
|
||||
}
|
||||
rtabTableGridTools.Visible = tmpGridItm != null && !tmpGridItm.MyFlexGrid.IsRoTable;
|
||||
rtabTableGridTools.Visible = tmpGridItm != null;
|
||||
// If no longer on a table (grid) or the newly selectd table is an RO table
|
||||
// then select the Home tab (since the Table tab is not visable)
|
||||
if ((!(MyEditItem is GridItem) && rtabTableGridTools.Checked)) // || ((MyEditItem is GridItem) && !rtabTableGridTools.Visible))
|
||||
@ -3030,9 +3030,14 @@ namespace Volian.Controls.Library
|
||||
|
||||
public void ToggleTableDesignButtons(bool enable)
|
||||
{
|
||||
bool enableContent = enable;
|
||||
if (MyFlexGrid != null && MyFlexGrid.IsRoTable) enableContent = false;
|
||||
btnTblDgnAlignText.Enabled = enable;
|
||||
btnTblDgnCopy.Enabled = enable;
|
||||
btnTblDgnRemove.Enabled = enable;
|
||||
btnTblDgnCopy.Enabled = enableContent;
|
||||
btnTblDgnRemove.Enabled = enableContent;
|
||||
btnCmGridInsert.Enabled = enableContent;
|
||||
btnCmGridCopy.Enabled = enableContent;
|
||||
btnCmGridRemove.Enabled = enableContent;
|
||||
//btnTblDgnGridStyle.Enabled = enable;
|
||||
//rbTblBorder.Enabled = enable;
|
||||
rbnBorderlistBox.Enabled = enable;
|
||||
@ -3040,11 +3045,11 @@ namespace Volian.Controls.Library
|
||||
btnTblNoBorder.Enabled = enable;
|
||||
btnTblOutline.Enabled = enable;
|
||||
btnTblInside.Enabled = enable;
|
||||
btnTblDgnInsertColumn.Enabled = enable;
|
||||
btnTblDgnInsertRow.Enabled = enable;
|
||||
btnTblDgnInsertColumn.Enabled = enableContent;
|
||||
btnTblDgnInsertRow.Enabled = enableContent;
|
||||
btnTblDgnMergeCells.Enabled = enable;
|
||||
btnCmGridPaste.Enabled =
|
||||
btnTblDgnPaste.Enabled = ((VlnFlexGrid.MyCopyInfo.MyCopiedFlexGrid != null) && enable);
|
||||
btnTblDgnPaste.Enabled = ((VlnFlexGrid.MyCopyInfo.MyCopiedFlexGrid != null) && enableContent);
|
||||
btnTblDgnSplitCells.Enabled = enable;
|
||||
}
|
||||
public void SetRibbonForGridCellIndent()
|
||||
|
@ -2412,7 +2412,8 @@ namespace Volian.Controls.Library
|
||||
private void _StartEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e)
|
||||
{
|
||||
// start editing the cell with the custom editor
|
||||
_tableCellEditor.StartEditing(e.Row, e.Col);
|
||||
if(!IsRoTable )
|
||||
_tableCellEditor.StartEditing(e.Row, e.Col);
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user