By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,709 Members | 1,689 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,709 IT Pros & Developers. It's quick & easy.

MaskedTextBox Help

P: n/a
I have a few masked textboxes within my application and I have the same
problem with each and everyone

If I tab to a masked textbox i have no issues, but when i click into a mask
textbox the problems arise.

when i click in it places the cursor where i click (not at the start of the
masked textbox), this forces users
to either click back to the start of the textbox or hold the left arrow key
to move back to the start

is there anyway to stop this, or even an onclick event?

Thanks

Mike Fellows
Oct 9 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
it's better if you post some code lines.

:-)
"Mike Fellows" <mi*************@equityhouse.NOSPAM.co.ukwrote in message
news:rY********************@giganews.com...
>I have a few masked textboxes within my application and I have the same
problem with each and everyone

If I tab to a masked textbox i have no issues, but when i click into a
mask textbox the problems arise.

when i click in it places the cursor where i click (not at the start of
the masked textbox), this forces users
to either click back to the start of the textbox or hold the left arrow
key to move back to the start

is there anyway to stop this, or even an onclick event?

Thanks

Mike Fellows
Oct 9 '06 #2

P: n/a
to be honest there isnt any code

i have a maskedtextbox (a standard control in vs 2005)

if i set the mask to 0000000000 (right click properties)

this will only allow me to input numbers (to a max of 10 numbers into the
control)

but when i click onto the control it will start at the posistion i click
(not at the start/left)

Cheers

Mike

"Raffaeu" <ra*****@raffaeu.comwrote in message
news:E5**********************************@microsof t.com...
it's better if you post some code lines.

:-)
"Mike Fellows" <mi*************@equityhouse.NOSPAM.co.ukwrote in message
news:rY********************@giganews.com...
>>I have a few masked textboxes within my application and I have the same
problem with each and everyone

If I tab to a masked textbox i have no issues, but when i click into a
mask textbox the problems arise.

when i click in it places the cursor where i click (not at the start of
the masked textbox), this forces users
to either click back to the start of the textbox or hold the left arrow
key to move back to the start

is there anyway to stop this, or even an onclick event?

Thanks

Mike Fellows

Oct 9 '06 #3

P: n/a

....yes - the only way around it is I've written an onEntry trigger for each
textbox and in it put:

yourmaskedtextbox.selectall()

It has the effect of selecting all of the text in your textbox so the cursor
gets put at the beginning of the field. May not be what you want - but it
works in certain cases depending on your needs.

--
Franklin M. Gauer III
Applications Development Manager
Integrated Companies, Inc.
"Mike Fellows" wrote:
to be honest there isnt any code

i have a maskedtextbox (a standard control in vs 2005)

if i set the mask to 0000000000 (right click properties)

this will only allow me to input numbers (to a max of 10 numbers into the
control)

but when i click onto the control it will start at the posistion i click
(not at the start/left)

Cheers

Mike

"Raffaeu" <ra*****@raffaeu.comwrote in message
news:E5**********************************@microsof t.com...
it's better if you post some code lines.

:-)
"Mike Fellows" <mi*************@equityhouse.NOSPAM.co.ukwrote in message
news:rY********************@giganews.com...
>I have a few masked textboxes within my application and I have the same
problem with each and everyone

If I tab to a masked textbox i have no issues, but when i click into a
mask textbox the problems arise.

when i click in it places the cursor where i click (not at the start of
the masked textbox), this forces users
to either click back to the start of the textbox or hold the left arrow
key to move back to the start

is there anyway to stop this, or even an onclick event?

Thanks

Mike Fellows


Oct 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.