GridCtrl: Added GotoFirstEdit

git-svn-id: svn://ultimatepp.org/upp/trunk@6134 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
unodgs 2013-06-05 07:20:24 +00:00
parent 95a377444b
commit df34a00f0c
2 changed files with 5 additions and 2 deletions

View file

@ -99,7 +99,8 @@ GridCtrl::GridCtrl() : holder(*this)
row_changing = true;
edit_mode = GE_ROW;
one_click_edit = false;
coloring_mode = 0;
goto_first_edit = true;
coloring_mode = 0;
isedit = false;
genr_ctrls = 0;
edit_ctrls = false;
@ -6582,7 +6583,7 @@ bool GridCtrl::StartEdit()
WhenStartEdit();
SetCtrlsData();
UpdateCtrls(UC_SHOW | UC_GOFIRST | UC_CURSOR | UC_CTRLS);
UpdateCtrls(UC_SHOW | UC_CURSOR | UC_CTRLS | (goto_first_edit ? UC_GOFIRST : 0));
return true;
}

View file

@ -864,6 +864,7 @@ class GridCtrl : public Ctrl
int resize_row_mode;
int edit_mode;
bool one_click_edit:1;
bool goto_first_edit:1;
bool inserting:1;
bool appending:1;
@ -1091,6 +1092,7 @@ class GridCtrl : public Ctrl
GridCtrl& EditRow() { edit_mode = GE_ROW; return *this; }
GridCtrl& EditCell() { edit_mode = GE_CELL; return *this; }
GridCtrl& OneClickEdit(bool b = true) { one_click_edit = b; return *this; }
GridCtrl& GotoFirstEdit(bool b = true) { goto_first_edit = b; return *this; }
GridCtrl& Absolute() { return ResizeColMode(0); }
GridCtrl& Proportional() { return ResizeColMode(1); }
GridCtrl& SelectRow(bool b = true) { select_row = b; return *this; }