This commit is contained in:
Kathy Ruffing 2011-03-09 11:54:40 +00:00
parent 778a11be12
commit b78e720313

View File

@ -1856,11 +1856,37 @@ namespace Volian.Controls.Library
SendKeys.Send("%H{ESC}");
break;
case Keys.Tab:
VlnFlexGrid myGrid = Parent as VlnFlexGrid;
if (myGrid == null)
{
e.SuppressKeyPress = true;
e.Handled = true;
Form frm = ParentForm(this);
if (frm != null)
frm.SelectNextControl(this, true, true, true, true);
}
else
{
if (e.Shift)
{
e.SuppressKeyPress = true;
e.Handled = true;
if (!myGrid.SelectPrevCell())
{
// don't do anything if at top (for now)
}
}
else
{
e.SuppressKeyPress = true;
e.Handled = true;
if (!myGrid.SelectNextCell())
{
myGrid.Rows.Add(1);
myGrid.SelectNextCell();
}
}
}
break;
case Keys.Enter:
if (!e.Control && !e.Shift && !e.Alt)
@ -2859,7 +2885,6 @@ namespace Volian.Controls.Library
private bool _LastWasLeftArrow = false;
private void StepRTB_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
//Console.WriteLine("StepRTB_PreviewKeyDown");
if ((e.KeyCode == Keys.Tab) && (!e.Alt && !e.Control))
e.IsInputKey = true;
// Remember if the last key pressed was a left arrow. This is used in HandleSelectionChanged