This commit is contained in:
parent
17a27bb8e8
commit
7f22d62f00
@ -537,7 +537,8 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
Focus();
|
Focus();
|
||||||
MyFlexGrid.Focus();
|
MyFlexGrid.Focus();
|
||||||
MyFlexGrid.Select(0, 0);
|
if (!MyFlexGrid.IsRoTable) // Table ROs are none editable - don't select a table cell
|
||||||
|
MyFlexGrid.Select(0, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -576,10 +577,13 @@ namespace Volian.Controls.Library
|
|||||||
int sl = MyStepRTB.SelectionLength;
|
int sl = MyStepRTB.SelectionLength;
|
||||||
MyFlexGrid.StartEditing();
|
MyFlexGrid.StartEditing();
|
||||||
MyStepRTB.Select(ss, sl); // need to reset selection because startediting positions to end.
|
MyStepRTB.Select(ss, sl); // need to reset selection because startediting positions to end.
|
||||||
string oldRtf = MyStepRTB.Rtf;
|
if (!MyStepRTB.ReadOnly)
|
||||||
DialogResult dr = MyStepRTB.ReplaceText(rpltxt, fndstr, caseSensitive, matchWholeWord, reverse, prompt, fndrpldlg);
|
{
|
||||||
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
|
string oldRtf = MyStepRTB.Rtf;
|
||||||
if (dr == DialogResult.Yes || dr == DialogResult.Cancel) return dr;
|
DialogResult dr = MyStepRTB.ReplaceText(rpltxt, fndstr, caseSensitive, matchWholeWord, reverse, prompt, fndrpldlg);
|
||||||
|
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
|
||||||
|
if (dr == DialogResult.Yes || dr == DialogResult.Cancel) return dr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
c = c + 1;
|
c = c + 1;
|
||||||
if (c == w)
|
if (c == w)
|
||||||
@ -605,10 +609,13 @@ namespace Volian.Controls.Library
|
|||||||
int sl = MyStepRTB.SelectionLength;
|
int sl = MyStepRTB.SelectionLength;
|
||||||
MyFlexGrid.StartEditing();
|
MyFlexGrid.StartEditing();
|
||||||
MyStepRTB.Select(ss, sl);
|
MyStepRTB.Select(ss, sl);
|
||||||
string oldRtf = MyStepRTB.Rtf;
|
if (!MyStepRTB.ReadOnly)
|
||||||
DialogResult dr = MyStepRTB.ReplaceText(rpltxt, fndstr, caseSensitive, matchWholeWord, reverse, prompt, fndrpldlg);
|
{
|
||||||
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
|
string oldRtf = MyStepRTB.Rtf;
|
||||||
if (dr == DialogResult.Yes || dr == DialogResult.Cancel) return dr;
|
DialogResult dr = MyStepRTB.ReplaceText(rpltxt, fndstr, caseSensitive, matchWholeWord, reverse, prompt, fndrpldlg);
|
||||||
|
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
|
||||||
|
if (dr == DialogResult.Yes || dr == DialogResult.Cancel) return dr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
c = c - 1;
|
c = c - 1;
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
|
@ -86,7 +86,8 @@ namespace Volian.Controls.Library
|
|||||||
grd.SetSearchCell(SearchString);
|
grd.SetSearchCell(SearchString);
|
||||||
}
|
}
|
||||||
// convert the '-' to the unicode non-breaking dash (\u8209? or \u2011 hex)
|
// convert the '-' to the unicode non-breaking dash (\u8209? or \u2011 hex)
|
||||||
SelectedEditItem.MyStepRTB.Find(SearchString.Replace('-','\u2011'));
|
if (!SelectedEditItem.MyStepRTB.IsRoTable)
|
||||||
|
SelectedEditItem.MyStepRTB.Find(SearchString.Replace('-','\u2011'));
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Contructors
|
#region Contructors
|
||||||
|
@ -1828,7 +1828,7 @@ namespace Volian.Controls.Library
|
|||||||
public void SetRibbonForGrid()
|
public void SetRibbonForGrid()
|
||||||
{
|
{
|
||||||
// set to true if editing cell, otherwise false for grids
|
// set to true if editing cell, otherwise false for grids
|
||||||
bool enable = (MyFlexGrid.Editor != null);
|
bool enable = (MyFlexGrid != null && MyFlexGrid.Editor != null);
|
||||||
btnPaste.Enabled = enable;
|
btnPaste.Enabled = enable;
|
||||||
btnCopy.Enabled = enable;
|
btnCopy.Enabled = enable;
|
||||||
btnCut.Enabled = enable;
|
btnCut.Enabled = enable;
|
||||||
|
@ -3827,6 +3827,7 @@ namespace Volian.Controls.Library
|
|||||||
public void StartEditing(int row, int col)
|
public void StartEditing(int row, int col)
|
||||||
{
|
{
|
||||||
_initializingEdit = true;
|
_initializingEdit = true;
|
||||||
|
ReadOnly = IsRoTable;
|
||||||
// save coordinates of cell being edited
|
// save coordinates of cell being edited
|
||||||
_row = row;
|
_row = row;
|
||||||
_col = col;
|
_col = col;
|
||||||
@ -3841,7 +3842,7 @@ namespace Volian.Controls.Library
|
|||||||
// initialize control content
|
// initialize control content
|
||||||
Text = "";
|
Text = "";
|
||||||
FindAllLinks(); // jsj 1-5-2011
|
FindAllLinks(); // jsj 1-5-2011
|
||||||
if (_pendingKey > ' ')
|
if (_pendingKey > ' ' && !ReadOnly)
|
||||||
Text = _pendingKey.ToString();
|
Text = _pendingKey.ToString();
|
||||||
else if (_owner[row, col] != null)
|
else if (_owner[row, col] != null)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user