|
-
Dec 15th, 2007, 11:41 AM
#1
Thread Starter
Addicted Member
[RESOLVED] TextBox help
Hi, i am making a program and one of its features is a skinner and iv got that all working but im stuck on a import bit. Iv got it all working to import and save data to a ini file but the problem is getting rid of [ and ] around the title of theme so it can be added to a listbox displaying all the themes. But i need the [ and ] around the title so i can save it.
If i had a textbox that had text in like this...
[Theme 1 title here]
backcolour=478593
textcolour=485849
etc...
or
[Theme title]
backcolour=478593
textcolour=485849
etc...
the textbox text will change according to the name of the title of theme. But i need it to be added to a listbox which displays all the themes but i want it to not have the [ and ] around it. So my problem is i can't figure out how to get rid of them.
I have some code to get rid of the first one...
Code:
Text1.Text = Split(Split(Label1.Caption, "[")(1), ".")(0)
so that gets rid of the first [ in the label title and adds the new title to a textbox so it will look like this Theme title]
but does anyone know how i would get rid of the second one at the end?
Is there a way to make a text box so when text is added to it if there is [ or ] in it, it will delete them and keep the other text in it.
Basically......
If i can a textbox with this text in - [Text here] , is there a way to put that text into a different textbox without the [ and ] so it would be Text here instead of [Text here]
Last edited by Banjo; Dec 15th, 2007 at 12:21 PM.
Reason: Needed to add more text
-
Dec 15th, 2007, 12:56 PM
#2
Re: TextBox help
What about this,
Code:
Text1.Text = Split(Split(Label1.Caption, "[")(1), ".")(0)
Text1.Text = Mid(Text1.Text, 1, InStr(Text1.Text, "]") - 1)
-
Dec 15th, 2007, 01:16 PM
#3
Thread Starter
Addicted Member
Re: TextBox help
Thanks sooooooo much that works great!!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|