Current location: Hot Scripts Forums » Programming Languages » Visual Basic » textbox help


textbox help

Reply
  #1 (permalink)  
Old 05-11-04, 05:37 PM
PaPPy PaPPy is offline
Newbie Coder
 
Join Date: May 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
textbox help

i need a way to convert a paragraph in a text box and break it up to one character per line in a text box or list box but with out the spaces


example:

hello what is up
_____convert to
h
e
l
l
o
w
h
a
t
i
s
u
p
Reply With Quote
  #2 (permalink)  
Old 05-11-04, 11:22 PM
gopinath_alr gopinath_alr is offline
Newbie Coder
 
Join Date: May 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,
try this.

Private Sub btnConvert_Click()
Dim str As String
Dim char As String
List1.Clear 'ListBox used for displaying splitten characters.
str = Text1.Text 'TextBox used for getting i/p string
For i = 1 To Len(str) Step 1
char = Mid(str, i, 1)
If char <> " " Then
List1.AddItem char
End If
Next i
End Sub
Reply With Quote
  #3 (permalink)  
Old 05-12-04, 05:28 PM
PaPPy PaPPy is offline
Newbie Coder
 
Join Date: May 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
the code works great but i ran into one problem how can i also exclude people from having enter in the text because when it loads over it puts a "|" and i can't just say exclude the symbol "|" because its not the same. i can ask the people to not have enter anywhere in the text but im sure that wont work

if i need a whole seperate statement to search the text and replace enter with a space or something

i'd appriacate anymore help
Reply With Quote
Reply

Bookmarks


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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
password textbox mpriest HTML/XHTML/XML 14 07-07-04 09:56 AM
Numeric textbox R.Amin Visual Basic 1 02-16-04 04:35 PM


All times are GMT -5. The time now is 01:20 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.