- Restore the selection color after HideCaret
- Only show the pseudo caret if the StepRTB was active for the grid Add a property to track if the StepRTB was active for a grid Track if the StepRTB was active for a grid
This commit is contained in:
@@ -36,9 +36,6 @@ namespace Volian.Controls.Library
|
||||
* 5) KBR Fix the grid (xml stored in Data) when a step is inserted so that transition text is changed,
|
||||
* or when an ROvalue is changed. In ItemInsertExt.cs, UpdateTransitionText &
|
||||
* UpdatePastedStepTransitionText
|
||||
* 6) RHM Insert HLS - wrong font.
|
||||
* 7) RHM HideCaret & ShowCaret should restore original color.
|
||||
* 8) RHM HideCaret & ShowCaret should not turn on editor unless editor had been previously been active
|
||||
*/
|
||||
#region Fields
|
||||
public VlnFlexGrid MyFlexGrid
|
||||
@@ -192,12 +189,10 @@ namespace Volian.Controls.Library
|
||||
MyFlexGrid.Focus();
|
||||
MyFlexGrid.StartEditing();
|
||||
}
|
||||
|
||||
void MyFlexGrid_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.Focus();
|
||||
}
|
||||
|
||||
void MyStepRTB_EditModeChanged(object sender, EventArgs args)
|
||||
{
|
||||
AdjustColorsForEditMode();
|
||||
@@ -219,6 +214,8 @@ namespace Volian.Controls.Library
|
||||
private string _OrigRtf; // used to store original rtf to allow for 'escape' key restore
|
||||
void MyFlexGrid_SelChange(object sender, EventArgs e)
|
||||
{
|
||||
RTBLastFocus = false;
|
||||
MyStepRTB.Visible = false; // Hide the editor if the Selection Changes
|
||||
if (MyFlexGrid.Selection.IsSingleCell && MyFlexGrid.Row >= 0 && MyFlexGrid.Col >= 0)
|
||||
{
|
||||
object obj = MyFlexGrid[MyFlexGrid.Row, MyFlexGrid.Col];
|
||||
@@ -276,8 +273,12 @@ namespace Volian.Controls.Library
|
||||
this.MyStepRTB.EditModeChanged += new StepRTBEvent(MyStepRTB_EditModeChanged);
|
||||
this.MyStepRTB.KeyDown += new KeyEventHandler(MyStepRTB_KeyDown);
|
||||
this.MyFlexGrid.SelChange += new EventHandler(MyFlexGrid_SelChange);
|
||||
this.MyStepRTB.GotFocus += new EventHandler(MyStepRTB_GotFocus);
|
||||
}
|
||||
void MyStepRTB_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
RTBLastFocus = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Override Method and Properties
|
||||
public override int BorderWidth { get { return (MyFlexGrid.Width - MyFlexGrid.ClientRectangle.Width); } }
|
||||
|
Reference in New Issue
Block a user