How to programmatically select register cell text?

Charles Day cedayiv at
Sat Feb 28 12:23:09 EST 2009

When typing an account name in the register, if you make a mistake and then
hit tab, it will ask if you want to make a new account. If you say "no",
then what you have typed is lost and focus moves to the next field in the
register. It seems better to me to keep the focus on the account field and
give the user a chance to fix the typo or to delete the text entirely if
they actually didn't intend to enter an account.
I have prepared a fix for bug 343217 (which is exactly this issue) such that
focus can remain on the account field, however I don't know how (or if it is
even presently possible) to make the text automatically be selected.

Does anyone know how to programmatically select text in a register cell? If
no one responds, then I'll just commit the change as is, and the text just
won't be selected after the user picks "no".


More information about the gnucash-devel mailing list