Is that a blank in your TextBox ...

E

eBob.com

.... 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
 
A

Andrew Morton

eBob.com said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top