RanjiniPraba
asked on
textbox- Scroll bars problem
HI,
I have a textbox,
I have set its properties as
Multiline to true
Scrollbars to both
locked to true
i have locked it because i dont want its contents to be edited.
the problem now is, when i display big messages, its scrollbars are not enabled. i want its scroll bars enabled and still lock the contents. i dont want the textbox to be disabled.
I have a textbox,
I have set its properties as
Multiline to true
Scrollbars to both
locked to true
i have locked it because i dont want its contents to be edited.
the problem now is, when i display big messages, its scrollbars are not enabled. i want its scroll bars enabled and still lock the contents. i dont want the textbox to be disabled.
unlock it and in the keydown event set the keycode argument to 0.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I tried this
Textbox Text1
Multiline to true
Scrollbars to both
locked to true
Dim t As String
t = Clipboard.GetText
Text1.Text = t
Copied this entire Question to the clipboard and ran teh program.
Both scrollbars worked just fine
Textbox Text1
Multiline to true
Scrollbars to both
locked to true
Dim t As String
t = Clipboard.GetText
Text1.Text = t
Copied this entire Question to the clipboard and ran teh program.
Both scrollbars worked just fine
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
This won't stop people from pasting with the mouse or menu, but will at least stop keyboard input. That should cover most cases.