Remove console.writeline
B2015-125: Add flexgrid leave event for reset of background color on leave.
This commit is contained in:
parent
0406cab44f
commit
c504e37285
@ -55,7 +55,6 @@ namespace Volian.Controls.Library
|
|||||||
// This event was added to better control enabling or disabling of the Insert and Copy Step buttons on the ribbon
|
// This event was added to better control enabling or disabling of the Insert and Copy Step buttons on the ribbon
|
||||||
void EditItem_Enter(object sender, EventArgs e)
|
void EditItem_Enter(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Console.WriteLine("EditItem Enter {0}", MyItemInfo);
|
|
||||||
bool allow = (MyStepPanel.VwMode == E_ViewMode.Edit);
|
bool allow = (MyStepPanel.VwMode == E_ViewMode.Edit);
|
||||||
StepTabRibbon str = MyStepPanel.MyStepTabPanel.MyStepTabRibbon;
|
StepTabRibbon str = MyStepPanel.MyStepTabPanel.MyStepTabRibbon;
|
||||||
str.SiblingsButtonsEnabled = allow;
|
str.SiblingsButtonsEnabled = allow;
|
||||||
|
@ -262,6 +262,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
this.MyFlexGrid.Resize += new EventHandler(MyFlexGrid_Resize);
|
this.MyFlexGrid.Resize += new EventHandler(MyFlexGrid_Resize);
|
||||||
this.MyFlexGrid.Enter += new EventHandler(MyFlexGrid_Enter);
|
this.MyFlexGrid.Enter += new EventHandler(MyFlexGrid_Enter);
|
||||||
|
this.MyFlexGrid.Leave += MyFlexGrid_Leave;
|
||||||
this.MyFlexGrid.CursorMovement += new VlnFlexGridCursorMovementEvent(MyFlexGrid_CursorMovement);
|
this.MyFlexGrid.CursorMovement += new VlnFlexGridCursorMovementEvent(MyFlexGrid_CursorMovement);
|
||||||
this.MyFlexGrid.OpenAnnotations += new VlnFlexGridEvent(MyFlexGrid_OpenAnnotations);
|
this.MyFlexGrid.OpenAnnotations += new VlnFlexGridEvent(MyFlexGrid_OpenAnnotations);
|
||||||
this.MyFlexGrid.KeyDown +=new KeyEventHandler(MyFlexGrid_KeyDown);
|
this.MyFlexGrid.KeyDown +=new KeyEventHandler(MyFlexGrid_KeyDown);
|
||||||
@ -291,6 +292,20 @@ namespace Volian.Controls.Library
|
|||||||
//
|
//
|
||||||
//this.MyStepRTB.Resize += new EventHandler(MyStepRTB_Resize);
|
//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)
|
//void MyStepRTB_EnterKeyPressed(object sender, KeyEventArgs args)
|
||||||
//{
|
//{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user