Results 1 to 6 of 6

Thread: Creating a Text box user control

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313

    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.

  2. #2
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    263
    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

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313
    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.

  4. #4
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    263
    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

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313
    by chance you would't have code on how to do that, because iv never heard of that, so im a bit confused.

  6. #6
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    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
  •  



Click Here to Expand Forum to Full Width