Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 10th, 2005, 4:46 PM   #1
tayspen
Hobbyist Programmer
 
Join Date: Sep 2005
Location: A House...
Posts: 191
Rep Power: 4 tayspen is on a distinguished road
Remove prevoius letter in textbox

How could this be done. so lets say on a click or somewhere in an event the last letter in the box would be removed. So if at first it looked like this

abcde

after the event it would look like this

abcd

I looked at String.Remove... but i neede help. thanks


-T
tayspen is offline   Reply With Quote
Old Dec 10th, 2005, 5:52 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Well, you want a Substring of the Text... think about it. You're looking at it the wrong way.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Dec 10th, 2005, 7:47 PM   #3
tayspen
Hobbyist Programmer
 
Join Date: Sep 2005
Location: A House...
Posts: 191
Rep Power: 4 tayspen is on a distinguished road
oO yes My bad. I think i take it from here. thanks fo the push in the right direction
tayspen is offline   Reply With Quote
Old Dec 10th, 2005, 11:19 PM   #4
tayspen
Hobbyist Programmer
 
Join Date: Sep 2005
Location: A House...
Posts: 191
Rep Power: 4 tayspen is on a distinguished road
Well....i lied lol. im not sure where to go. any help?
tayspen is offline   Reply With Quote
Old Dec 10th, 2005, 11:53 PM   #5
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
String.Remove

Snip off one character starting at the last index. Note that it returns a new string;the existing one is not changed. Assign the result of <textbox>.Text.Remove to <textbox>.Text for that very reason.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Old Dec 11th, 2005, 10:22 AM   #6
tayspen
Hobbyist Programmer
 
Join Date: Sep 2005
Location: A House...
Posts: 191
Rep Power: 4 tayspen is on a distinguished road
Quote:
Originally Posted by Dameon
String.Remove

Snip off one character starting at the last index. Note that it returns a new string;the existing one is not changed. Assign the result of <textbox>.Text.Remove to <textbox>.Text for that very reason.
Thanks

-T
tayspen is offline   Reply With Quote
Old Dec 11th, 2005, 5:10 PM   #7
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Welp, I'm an idiot.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Dec 11th, 2005, 5:22 PM   #8
tayspen
Hobbyist Programmer
 
Join Date: Sep 2005
Location: A House...
Posts: 191
Rep Power: 4 tayspen is on a distinguished road
I thought it might be remove
tayspen is offline   Reply With Quote
Old Dec 11th, 2005, 5:49 PM   #9
JDStud6
Programmer
 
Join Date: Jan 2005
Location: Charleston, SC www.wareonearth.com
Posts: 57
Rep Power: 4 JDStud6 is on a distinguished road
Send a message via AIM to JDStud6
I'm sure a substring could be used as well. You would do it from 0 to string.length - 1 I guess.

JD
JDStud6 is offline   Reply With Quote
Old Dec 11th, 2005, 10:17 PM   #10
tayspen
Hobbyist Programmer
 
Join Date: Sep 2005
Location: A House...
Posts: 191
Rep Power: 4 tayspen is on a distinguished road
Hey, JD would you mind whowing me an example of this?
tayspen is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:32 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC