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"));
|
OnSetMenu(this, new StepRTBMenuEventArgs(inPsi?"PSI":"OpenContextMenu"));
|
||||||
_ContextMenuStripChanged = false;
|
_ContextMenuStripChanged = false;
|
||||||
CorrectSelectionAtEndOfLine();
|
CorrectSelectionAtEndOfLine();
|
||||||
|
_MouseDown = true;
|
||||||
}
|
}
|
||||||
void StepRTB_MouseUp(object sender, MouseEventArgs e)
|
void StepRTB_MouseUp(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
@ -1512,6 +1513,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
private void HandleSelectionChange()
|
private void HandleSelectionChange()
|
||||||
{
|
{
|
||||||
|
if (_MouseDown) return;
|
||||||
if (_HandlingCtrlA) return;
|
if (_HandlingCtrlA) return;
|
||||||
if (!_HandlingCtrlA && this.TextLength == this.SelectionLength && this.SelectedRtf.EndsWith("\\par\r\n}\r\n"))
|
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;
|
btnTblDgnAdjustSize.Checked = false;
|
||||||
ToggleTableDesignButtons(true);
|
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
|
// 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)
|
// then select the Home tab (since the Table tab is not visable)
|
||||||
if ((!(MyEditItem is GridItem) && rtabTableGridTools.Checked)) // || ((MyEditItem is GridItem) && !rtabTableGridTools.Visible))
|
if ((!(MyEditItem is GridItem) && rtabTableGridTools.Checked)) // || ((MyEditItem is GridItem) && !rtabTableGridTools.Visible))
|
||||||
@ -3030,9 +3030,14 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
public void ToggleTableDesignButtons(bool enable)
|
public void ToggleTableDesignButtons(bool enable)
|
||||||
{
|
{
|
||||||
|
bool enableContent = enable;
|
||||||
|
if (MyFlexGrid != null && MyFlexGrid.IsRoTable) enableContent = false;
|
||||||
btnTblDgnAlignText.Enabled = enable;
|
btnTblDgnAlignText.Enabled = enable;
|
||||||
btnTblDgnCopy.Enabled = enable;
|
btnTblDgnCopy.Enabled = enableContent;
|
||||||
btnTblDgnRemove.Enabled = enable;
|
btnTblDgnRemove.Enabled = enableContent;
|
||||||
|
btnCmGridInsert.Enabled = enableContent;
|
||||||
|
btnCmGridCopy.Enabled = enableContent;
|
||||||
|
btnCmGridRemove.Enabled = enableContent;
|
||||||
//btnTblDgnGridStyle.Enabled = enable;
|
//btnTblDgnGridStyle.Enabled = enable;
|
||||||
//rbTblBorder.Enabled = enable;
|
//rbTblBorder.Enabled = enable;
|
||||||
rbnBorderlistBox.Enabled = enable;
|
rbnBorderlistBox.Enabled = enable;
|
||||||
@ -3040,11 +3045,11 @@ namespace Volian.Controls.Library
|
|||||||
btnTblNoBorder.Enabled = enable;
|
btnTblNoBorder.Enabled = enable;
|
||||||
btnTblOutline.Enabled = enable;
|
btnTblOutline.Enabled = enable;
|
||||||
btnTblInside.Enabled = enable;
|
btnTblInside.Enabled = enable;
|
||||||
btnTblDgnInsertColumn.Enabled = enable;
|
btnTblDgnInsertColumn.Enabled = enableContent;
|
||||||
btnTblDgnInsertRow.Enabled = enable;
|
btnTblDgnInsertRow.Enabled = enableContent;
|
||||||
btnTblDgnMergeCells.Enabled = enable;
|
btnTblDgnMergeCells.Enabled = enable;
|
||||||
btnCmGridPaste.Enabled =
|
btnCmGridPaste.Enabled =
|
||||||
btnTblDgnPaste.Enabled = ((VlnFlexGrid.MyCopyInfo.MyCopiedFlexGrid != null) && enable);
|
btnTblDgnPaste.Enabled = ((VlnFlexGrid.MyCopyInfo.MyCopiedFlexGrid != null) && enableContent);
|
||||||
btnTblDgnSplitCells.Enabled = enable;
|
btnTblDgnSplitCells.Enabled = enable;
|
||||||
}
|
}
|
||||||
public void SetRibbonForGridCellIndent()
|
public void SetRibbonForGridCellIndent()
|
||||||
|
@ -2412,6 +2412,7 @@ namespace Volian.Controls.Library
|
|||||||
private void _StartEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e)
|
private void _StartEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e)
|
||||||
{
|
{
|
||||||
// start editing the cell with the custom editor
|
// start editing the cell with the custom editor
|
||||||
|
if(!IsRoTable )
|
||||||
_tableCellEditor.StartEditing(e.Row, e.Col);
|
_tableCellEditor.StartEditing(e.Row, e.Col);
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user