Questions about the focus of textbox

  • Thread starter Thread starter Albinas
  • Start date Start date
A

Albinas

Hi all,

I am trying to customize the text box to suit the
practice of my app. And I am working about the focus
behavior of text field.

I have met the the following problem. When I set
the "tabstop" property of a textbox to "False", the
textbox does receive focus when user use the mouse to
click. However, if I set the "Enable" property to false,
the forecolor of the text will change to grey. Is there
any method that I can prevent the textbox getting the
focus neither by "Tab" key nor "Mouse" click?

Thanks for your attention.

Rgs,
Albinas
 
What about using a label with its border and backcolor changed so that it
looks like a textbox?
 
Hi all,

Thanks scott. But the field really needs input
function under some situations. Actually, we are trying
to divide the window form into read mode, insert mode,
update mode and etc. And textbox in each mode will be
given different setting of "ReadOnly", "TabStop", "Enable"
and "Visible".

For example, some fields will be editable during insert
mode while some will be invisible (autorun number with
user's defined format key) But that key will
become "visible Only" when the form is under "browse mode".

Your suggestion is actually my last sort of work-around.

Is there any other suggestion?

Rgs,
Albinas
 
I believe that there is also a Locked property for a text
box, this might help you although I am not sure about
whether the control can receive focus.
-----Original Message-----
Hi all,

Thanks scott. But the field really needs input
function under some situations. Actually, we are trying
to divide the window form into read mode, insert mode,
update mode and etc. And textbox in each mode will be
given different setting
of "ReadOnly", "TabStop", "Enable"
 
Locked will still receive focus.

You may want to consider using a label (as I described earlier) for your
read mode and a textbox for your insert and update modes.
 
Back
Top