469,580 Members | 2,040 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,580 developers. It's quick & easy.

Questions about the focus of textbox

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
Jul 21 '05 #1
4 1678
What about using a label with its border and backcolor changed so that it
looks like a textbox?
"Albinas" <an*******@discussions.microsoft.com> wrote in message
news:48****************************@phx.gbl...
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

Jul 21 '05 #2
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
-----Original Message-----
What about using a label with its border and backcolor changed so that itlooks like a textbox?
"Albinas" <an*******@discussions.microsoft.com> wrote in messagenews:48****************************@phx.gbl...
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

.

Jul 21 '05 #3
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"and "Visible".

For example, some fields will be editable during insertmode 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
-----Original Message-----
What about using a label with its border and backcolor

changed so that it
looks like a textbox?
"Albinas" <an*******@discussions.microsoft.com> wrote in

message
news:48****************************@phx.gbl...
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 tofalse, 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

.

.

Jul 21 '05 #4
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.
"Mark" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
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"
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
-----Original Message-----
What about using a label with its border and backcolor

changed so that it
looks like a textbox?
"Albinas" <an*******@discussions.microsoft.com> wrote in

message
news:48****************************@phx.gbl...
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
.

.

Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by Neil Ginsberg | last post: by
4 posts views Thread by Sccr18 | last post: by
5 posts views Thread by Tosch | last post: by
8 posts views Thread by Albinas | last post: by
3 posts views Thread by Henry Jones | last post: by
3 posts views Thread by hugo | last post: by
3 posts views Thread by jp2express | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.