Read Only Textbox??

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Hi

I wish to create a ReadOnly textbox to display
information that I do not wish the user to change, but I
still wish to retain the scrollbar functionality etc.
incase the text is larger than the displayable area.

This was a simple property in VB6 but seems to of
disappeared, progress???

Anyhow, I assume I need to extend the normal TextBox
class and overide a method or 2 to achieve this, but
which ones?

Can anyone point me in the right direction?

Thanks in advance

Andy

p.s. I'm using C#
 
Hi Andy,

The textBox already has a "ReadOnly" and "Multiline" property(set both to
true).
For scrolling, check the "ScrollBars" property(set it to vertical).
Additionally, the "WordWrap" property may also needs to be set.

Regards,
Sankalp
 
Ha

Thanks for that, I think I was a little quick to post my
query, when I set the ReadOnly property it changed the
background colour as if it was disabled which through me
a little!

I now realise you can simply change the background colour
as required, easy peasy!

thanks for your response, very much appreciated

Regards

Andy
 
* "Andy said:
I wish to create a ReadOnly textbox to display
information that I do not wish the user to change, but I
still wish to retain the scrollbar functionality etc.
incase the text is larger than the displayable area.

This was a simple property in VB6 but seems to of
disappeared, progress???

Anyhow, I assume I need to extend the normal TextBox
class and overide a method or 2 to achieve this, but
which ones?

Set the control's 'ReadOnly' property to 'true'.
 
Back
Top