N
news.microsoft.com
Been stuck on this one for a long time now.
(Please do not confuse "Edit Mode" in the question below with AllowEdit)
Once a text control gets focus, is there any way from code to tell what mode
it is in (Navigation or Edit)?
When you tab to a field, you arrive there in "Navigation mode" (all text is
highlighted), however, if you click in the text control, you enter it in
"Edit mode" (flashing cursor). I know that when you press F2 you can toggle
between modes but I need to know which mode I am in...
i.e. Screen.ActiveControl.WhatModeDamnIt
Alternatively, is there anyway to change the mode other than sending an F2
via sendkeys?
i.e.Me.MyControl.SetFocus
Me.MyControl.SetModeToEdit
The problem with sending an F2 key is that, if you don't know what mode you
are in to start with, you may be switching to the wrong mode.
The only thing I've come up with so far is to setfocus quickly over to
another control and then back again so the I know for sure I am in
Navigation mode, Then send an F2 keystroke (which is stupid).
Please help,
Tiffany
(Please do not confuse "Edit Mode" in the question below with AllowEdit)
Once a text control gets focus, is there any way from code to tell what mode
it is in (Navigation or Edit)?
When you tab to a field, you arrive there in "Navigation mode" (all text is
highlighted), however, if you click in the text control, you enter it in
"Edit mode" (flashing cursor). I know that when you press F2 you can toggle
between modes but I need to know which mode I am in...
i.e. Screen.ActiveControl.WhatModeDamnIt
Alternatively, is there anyway to change the mode other than sending an F2
via sendkeys?
i.e.Me.MyControl.SetFocus
Me.MyControl.SetModeToEdit
The problem with sending an F2 key is that, if you don't know what mode you
are in to start with, you may be switching to the wrong mode.
The only thing I've come up with so far is to setfocus quickly over to
another control and then back again so the I know for sure I am in
Navigation mode, Then send an F2 keystroke (which is stupid).
Please help,
Tiffany