From: eBob.com on
.... or are you glad to see me? (Sorry, an oblique reference to an old Mae
West line.)

But seriously ... sometimes a blank in a TextBox means something very much
different than nothing in the TextBox, but there is no visual clue to the
end user which permits him to distinguish between the two cases - that I
know of. So that's my question. Is there anything I can do with a standard
TextBox which would make it visually obvious whether a string ended with the
last visible character or had some number of trailing blanks?

I suppose I can develop my own class which inherits from TextBox and pad the
string on the right with some character which can't easily be entered and
which the end user should have no reason to use. But I also suspect that
this will get somewhat messy before it works to my satisfaction. So ... any
ideas?

Thanks, Bob

From: Cor Ligthert[MVP] on
You can start looking what the masked textbox can do for you.


"eBob.com" <eBob.com(a)totallybogus.com> wrote in message
news:uVsx4bX4KHA.5032(a)TK2MSFTNGP02.phx.gbl...
> ... or are you glad to see me? (Sorry, an oblique reference to an old Mae
> West line.)
>
> But seriously ... sometimes a blank in a TextBox means something very much
> different than nothing in the TextBox, but there is no visual clue to the
> end user which permits him to distinguish between the two cases - that I
> know of. So that's my question. Is there anything I can do with a
> standard TextBox which would make it visually obvious whether a string
> ended with the last visible character or had some number of trailing
> blanks?
>
> I suppose I can develop my own class which inherits from TextBox and pad
> the string on the right with some character which can't easily be entered
> and which the end user should have no reason to use. But I also suspect
> that this will get somewhat messy before it works to my satisfaction. So
> ... any ideas?
>
> Thanks, Bob
>
From: Andrew Morton on
eBob.com wrote:
> But seriously ... sometimes a blank in a TextBox means something very
> much different than nothing in the TextBox, but there is no visual
> clue to the end user which permits him to distinguish between the two
> cases - that I know of. So that's my question. Is there anything I
> can do with a standard TextBox which would make it visually obvious
> whether a string ended with the last visible character or had some
> number of trailing blanks?

If you select all the text in the box then trailing blanks would be
highlighted.

--
Andrew