This commit is contained in:
parent
778a11be12
commit
b78e720313
@ -1856,11 +1856,37 @@ namespace Volian.Controls.Library
|
|||||||
SendKeys.Send("%H{ESC}");
|
SendKeys.Send("%H{ESC}");
|
||||||
break;
|
break;
|
||||||
case Keys.Tab:
|
case Keys.Tab:
|
||||||
|
VlnFlexGrid myGrid = Parent as VlnFlexGrid;
|
||||||
|
if (myGrid == null)
|
||||||
|
{
|
||||||
e.SuppressKeyPress = true;
|
e.SuppressKeyPress = true;
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
Form frm = ParentForm(this);
|
Form frm = ParentForm(this);
|
||||||
if (frm != null)
|
if (frm != null)
|
||||||
frm.SelectNextControl(this, true, true, true, true);
|
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;
|
break;
|
||||||
case Keys.Enter:
|
case Keys.Enter:
|
||||||
if (!e.Control && !e.Shift && !e.Alt)
|
if (!e.Control && !e.Shift && !e.Alt)
|
||||||
@ -2859,7 +2885,6 @@ namespace Volian.Controls.Library
|
|||||||
private bool _LastWasLeftArrow = false;
|
private bool _LastWasLeftArrow = false;
|
||||||
private void StepRTB_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
private void StepRTB_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("StepRTB_PreviewKeyDown");
|
|
||||||
if ((e.KeyCode == Keys.Tab) && (!e.Alt && !e.Control))
|
if ((e.KeyCode == Keys.Tab) && (!e.Alt && !e.Control))
|
||||||
e.IsInputKey = true;
|
e.IsInputKey = true;
|
||||||
// Remember if the last key pressed was a left arrow. This is used in HandleSelectionChanged
|
// Remember if the last key pressed was a left arrow. This is used in HandleSelectionChanged
|
||||||
|
Loading…
x
Reference in New Issue
Block a user