* BUG: TextBox: Make SetFocus() not select the text.

[GB.GTK3]
* BUG: TextBox: Make SetFocus() not select the text.


git-svn-id: svn://localhost/gambas/trunk@7899 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2016-09-07 20:08:36 +00:00
parent ef3a67c173
commit d2afc5bc00
2 changed files with 12 additions and 0 deletions

View file

@ -505,3 +505,14 @@ void gTextBox::getCursorPos(int *x, int *y, int pos)
*x = px + PANGO_PIXELS(rect.x);
*y = py + PANGO_PIXELS(rect.y + rect.height);
}
void gTextBox::setFocus()
{
bool r = isReadOnly();
if (!r)
setReadOnly(true);
gControl::setFocus();
if (!r)
setReadOnly(false);
}

View file

@ -55,6 +55,7 @@ public:
//"Methods"
virtual void clear();
virtual void setFocus();
void insert(char* txt,int len);
void selClear();
void select(int start,int len);