Remove console.writeline

B2015-125: Add flexgrid leave event for reset of background color on leave.
This commit is contained in:
2015-09-23 16:30:39 +00:00
parent 0406cab44f
commit c504e37285
2 changed files with 15 additions and 1 deletions

View File

@@ -262,6 +262,7 @@ namespace Volian.Controls.Library
{
this.MyFlexGrid.Resize += new EventHandler(MyFlexGrid_Resize);
this.MyFlexGrid.Enter += new EventHandler(MyFlexGrid_Enter);
this.MyFlexGrid.Leave += MyFlexGrid_Leave;
this.MyFlexGrid.CursorMovement += new VlnFlexGridCursorMovementEvent(MyFlexGrid_CursorMovement);
this.MyFlexGrid.OpenAnnotations += new VlnFlexGridEvent(MyFlexGrid_OpenAnnotations);
this.MyFlexGrid.KeyDown +=new KeyEventHandler(MyFlexGrid_KeyDown);
@@ -291,6 +292,20 @@ namespace Volian.Controls.Library
//
//this.MyStepRTB.Resize += new EventHandler(MyStepRTB_Resize);
}
void MyFlexGrid_Leave(object sender, EventArgs e)
{
// MyFlexGrid_Leave appears to be a consistent event that occurs when leaving
// flex grid whether if last cell was in edit or view mode.
// if ContainsFocus is true, then flexgrid still contains focus, so don't change
// any cell colors - otherwise set back to inactive.
if (this.ContainsFocus) return;
CellStyle cs = MyFlexGrid.Styles["Focus"];
cs.ForeColor = Color.Black;
cs = MyFlexGrid.Styles["Highlight"];
cs.ForeColor = Color.Black;
cs.BackColor = MyStepPanel.InactiveColor;
}
//void MyStepRTB_EnterKeyPressed(object sender, KeyEventArgs args)
//{