简体   繁体   English

什么是.NET控件与此映像等效?

[英]what are controls .NET equivalent to this image?

in this picture,I can see: MenuStrip ,??, TextBox 在这张照片中,我可以看到: MenuStrip ,??, TextBox

在此处输入图片说明

how do I an bar like this that have the enumeration? 这样的具有枚举的酒吧怎么办? I hope this clear. 我希望这很清楚。 Thanks in advance. 提前致谢。

If you're talking about the menu bar at the top of the window (just below the caption/title bar, which you should get for free from any Form object), then that is not a MenuStrip control. 如果您在谈论窗口顶部的菜单栏(恰好在标题/标题栏的下面,应该从任何Form对象免费获得),那么那不是 MenuStrip控件。

The MenuStrip control doesn't use the native Windows menu bar, which means it's going to look very different on Windows Vista and later where the appearance of the standard menu bar was altered to be blue and plasticky. MenuStrip控件不使用本机Windows菜单栏,这意味着在Windows Vista以及以后的版本中,标准菜单栏的外观被更改为蓝色和可塑性,它将看起来非常不同。 Since MenuStrip is drawn entirely in C# code, it's going to look permanently cheesy and stick out like a sore thumb. 因为MenuStrip完全是用C#代码绘制的,所以它将看起来永远是俗气的,并像酸痛的拇指一样伸出。

If you want the standard Windows menu bar, you need to use the old MainMenu control . 如果要使用标准Windows菜单栏,则需要使用旧的MainMenu控件 This is what everyone used back in the early days of .NET, but it's still available for backwards-compatibility and for people who care about what their apps look like. 这是.NET早期每个人都曾经使用过的,但是仍然可以向后兼容以及关心应用程序外观的人使用。 You'll probably have to add it to the toolbox manually because it's not there by default. 您可能必须手动将其添加到工具箱中,因为默认情况下它不存在。 Right-click on your toolbox and click "Choose Items", then find MainMenu in the list of available controls and ensure that it is checked. 右键单击您的工具箱,然后单击“选择项目”,然后在可用控件列表中找到MainMenu并确保已选中它。

As Blorgbeard suggested in the comments, if you're talking about the line numbers and the text editing control, they're not the standard TextBox control, either. 正如Blorgbeard在评论中建议的那样,如果您在谈论行号和文本编辑控件,它们也不是标准的TextBox控件。 In fact, they're not a standard Windows control at all. 实际上,它们根本不是标准的Windows控件。 That's a custom control designed specifically for editing code, probably Scintilla . 那是一个专门为编辑代码而设计的自定义控件,可能是Scintilla
You can find a .NET implementation here: http://scintillanet.codeplex.com/ 您可以在此处找到.NET实现: http : //scintillanet.codeplex.com/

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

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