fixed logic that selects the table cell under the mouse pointer when the table is first clicked upon.
This commit is contained in:
parent
ebe7ae7ffa
commit
3faef16a06
@ -649,6 +649,14 @@ namespace Volian.Controls.Library
|
||||
this.MouseDown += new MouseEventHandler(VlnFlexGrid_MouseDown);
|
||||
}
|
||||
|
||||
private bool _FirstEntry = false;
|
||||
|
||||
public bool FirstEntry
|
||||
{
|
||||
get { return _FirstEntry; }
|
||||
set { _FirstEntry = value; }
|
||||
}
|
||||
|
||||
void VlnFlexGrid_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
int left = 0;
|
||||
@ -675,7 +683,11 @@ namespace Volian.Controls.Library
|
||||
//Console.WriteLine("Mousedown Row, Col [{0},{1}]", row, col);
|
||||
erow = Math.Max(erow, row);
|
||||
ecol = Math.Max(ecol, col);
|
||||
Select(strow, stcol, erow, ecol);
|
||||
if (_FirstEntry)
|
||||
Select(row, col);
|
||||
else
|
||||
Select(strow, stcol, erow, ecol);
|
||||
_FirstEntry = false;
|
||||
}
|
||||
|
||||
|
||||
@ -747,11 +759,13 @@ namespace Volian.Controls.Library
|
||||
break;
|
||||
case Keys.Right:
|
||||
if (e.Shift) return;
|
||||
if (IsRoTable) Select(Rows.Count - 1, Cols.Count - 1);
|
||||
_tableCellEditor.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlRight : E_ArrowKeys.Right);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case Keys.Down:
|
||||
if (e.Shift) return;
|
||||
if (IsRoTable) Select(Rows.Count - 1, 0);
|
||||
_tableCellEditor.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlDown : E_ArrowKeys.Down);
|
||||
e.Handled = true;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user