PC Review


Reply
Thread Tools Rate Thread

CustomTextBox

 
 
Jay Dee
Guest
Posts: n/a
 
      4th Apr 2009
I have been looking for a way to make an auto size text box for a
project that I am working on.

In the end I have up on the TextBox/RitchTextBox classes as they
wouldn’t do what I wanted them to do.

The basic requirements that I was looking for is the text box are as
follows:
1. A fixed width but the height will resize depending on the text.
2. All text will be in the same Font size but I would like to be able
to set the fore/back colour of selected text.
3. Access to the location of characters so that I can custom paint to
highlight spelling mistakes.

To try and achieve these goals I have designed a CustomTextBox that
derives from Control. I am quite happy with my achievements and have
learned a lot.

I was wondering if someone would have the time to take a look and see
if they can point out how to speed things up little. It works
brilliantly with only a few lines of text but once the page gets a bit
bigger things start getting sluggish.

I now that it doesn’t wrap a whole word at the moment, I can sort
that.

Another big problem is that when typing text into one of the text
boxes the TableLayoputPanel is auto scrolling to the start of the
TextBox, this is no use if the text box is bigger than the form
because it scrolls the cursor out of view, I carnet work out how to
stop it. It is not my CustomTextBox because it also douse it if I use
a normal TextBox. Any suggestions.

Below is a link to the source code and a small example of what it will
do so fare.

www.jdnd.co.uk/bin/CustomTextBox.rar

Thank you

Jay Dee

 
Reply With Quote
 
 
 
 
Jay Dee
Guest
Posts: n/a
 
      4th Apr 2009
sorry I have had to change the link and put a 2 in it

for some stupid reason my server wont accept that path

www.jdnd.co.uk/bin2/CustomTextBox.rar
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:10 AM.