|
-
Mar 19th, 2003, 10:33 PM
#1
Thread Starter
Hyperactive Member
Creating a Text box user control
I was wondering how to creat a textbox user control, much like the richtext box but with my own functions. My only problem is inputing the text and displaying the text and what not, can anyone help me. I am using VB.net, if there are any books or websites please help. Thank you.
-
Mar 20th, 2003, 09:35 AM
#2
Hyperactive Member
Hi
Open a new project of type windows controls, on the form drop a normal textbox, set it to fill
Then override the text property and others like multiline word wrap.
Then add your own methods to the same class, may checking for just numbers on the keypress event, so that the text box is just a number box. Have a property for that like numberOnly!
Hope this helps
Danny
-
Mar 20th, 2003, 07:15 PM
#3
Thread Starter
Hyperactive Member
no i ment like a richtextbox like control, but with the ability to change the color of text with out haveing to highlight the text and change it because if you do it a lot it makes the text flicker.
-
Mar 21st, 2003, 05:36 AM
#4
Hyperactive Member
Hi
In that case drop a rich textbox into the controls form, then add a right click menu with the options for color.
In the function that you change the colour of the text make sure to use SuspendLayout and ResumeLayout this will stop your flicker!
Hope this helps
Danny
-
Mar 21st, 2003, 03:29 PM
#5
Thread Starter
Hyperactive Member
by chance you would't have code on how to do that, because iv never heard of that, so im a bit confused.
-
Mar 21st, 2003, 03:33 PM
#6
yay gay
just create a class and inherit it from a txtbox control
\m/  \m/
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
|