faqts : Computers : Programming : Languages : Visual basic

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

10 of 19 people (53%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

A disabled multilined textbox can't be scrolled by users. How can I make it readonly and scrollable?

Apr 11th, 2001 05:47
Mike Ogilvie, Touraj Farazjou,


There are two immediate possibilities.

1. Keep the textbox enabled but put code into the OnChange event of the 
textbox that essentially does not allow anyone to edit the contents of 
the textbox.

2. Make it a label instead of a textbox, but format the label to look 
like a textbox. Then put a scrollbar control next to the label and 
format its events and display to coincide with the label.

I think #2 is a more elegant solution but is harder to code. If this is 
more than just proof-of-concept code, I'd go with #2.