Home All Groups Group Topic Archive Search About
Author
9 Oct 2006 1:12 PM
Mike Fellows
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

Author
9 Oct 2006 1:52 PM
Raffaeu
it's better if you post some code lines.

Show quoteHide quote
:-)
"Mike Fellows" <michael.fellows@equityhouse.NOSPAM.co.uk> wrote in message
news:rYqdndoilM-h0rfYRVn_vA@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
>
Author
9 Oct 2006 2:04 PM
Mike Fellows
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



Show quoteHide quote
"Raffaeu" <raff***@raffaeu.com> wrote in message
news:E5BE4116-3A48-4979-A166-B7B326D0EDDE@microsoft.com...
> it's better if you post some code lines.
>
> :-)
> "Mike Fellows" <michael.fellows@equityhouse.NOSPAM.co.uk> wrote in message
> news:rYqdndoilM-h0rfYRVn_vA@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
>>
>
Author
19 Oct 2006 9:12 PM
Franklin M. Gauer III
....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.


Show quoteHide quote
"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" <raff***@raffaeu.com> wrote in message
> news:E5BE4116-3A48-4979-A166-B7B326D0EDDE@microsoft.com...
> > it's better if you post some code lines.
> >
> > :-)
> > "Mike Fellows" <michael.fellows@equityhouse.NOSPAM.co.uk> wrote in message
> > news:rYqdndoilM-h0rfYRVn_vA@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
> >>
> >
>
>
>