Reputation: 2124
I'm trying to add a verticle scroll bar to my dynamic Textbox.
Here is the code
TextBox spellText = new TextBox() { Multiline = true, ScrollBars.Vertical };
I get the error:
Invalid initializer member declarator
ScrollBars.Verticle = True also does not work.
Upvotes: 1
Views: 1072
Reputation: 81610
Assuming WinForms, the declaration isn't quite right. Try this:
TextBox spellText = new TextBox() { Multiline = true,
ScrollBars = ScrollBars.Vertical };
Upvotes: 2