简体   繁体   English

动态文本框滚动条

[英]Dynamic TextBox scrollbar

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. ScrollBars.Verticle = True 也不起作用。

Assuming WinForms, the declaration isn't quite right.假设 WinForms,声明不太正确。 Try this:尝试这个:

TextBox spellText = new TextBox() { Multiline = true,
                                    ScrollBars = ScrollBars.Vertical };

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM