If you are meaning can you remove it once it is held in a string, then yes.
string s = " hello";
s = s.Trim();
If you mean in a textbox then use the Trim method on the Text property. You
will need to move the cursor afterwards so that the user isn't surprised.
Alternatively, use the KeyDown event, check for space and the selection
being at the beginning of the text box and mark it handled so the space
isn't added. You will still need to check for pasting in a space from the
clipboard though.
--
BlackWasp
www.blackwasp.co.uk
"Rob Eventine" <bt****@ntlworld.comwrote in message
news:AI*****************@newsfe3-win.ntli.net...
hi all,
is there a way to eliminate a 'space character' (the space bar being
pressed) from the beginning of a line?
eg:
hello
as opposed to
hello
thanks in advance