TextBox, MultiLine - a stupid problem....
Welcome
Someone know? how to change property (Multiline) for a TextBox to True in run - time with simultaneous change his size (height)
Always, when I trying it finish with a get of error >> Can’t assign to read-only property <<
I try to do in this way:
VB Code:
Private Sub Command1_Click()
With Text1
.MultiLine = True
.ScrollBars = 2
.Height = 300
End With
End Sub
But something is a wrong, how correctly to make this?
Thanks in advance
Re: TextBox, MultiLine - a stupid problem....
You will have to set the multiline property at design time, the others can be set via code
Re: TextBox, MultiLine - a stupid problem....
Thanks the182guy for quick reply.
If I understood you well - ONLY at design time? Yes?
Tamgo
Re: TextBox, MultiLine - a stupid problem....
That's right, but you can simulate that effect with two textboxes. They will need to be set up as a control array, and you'll need a module-level variable to use as an index to the array.
Re: TextBox, MultiLine - a stupid problem....
Thanks Logophobic, surely it's some way.
Re: TextBox, MultiLine - a stupid problem....
No, as Logophobic you need two textboxes, one with the MultiLine = True and one with it False. You can put them on top of each other with One being Visible and the other not, and then swap visibility as needed. You don't have to have a control array but it it's neater that way.