如何在 C# 中创建 ContextMenuStrip 哪些项目是图像?
我想在 C# 中创建上下文菜单,其中项目是不同高度和宽度的图像。
我不知道如何解决的主要问题是如何设置菜单项和上下文菜单的宽度和高度。
如果启用了菜单项的自动调整大小,则所有菜单项的高度都相同。 如果我禁用菜单项的自动调整大小,则我无法正确设置上下文菜单的宽度 - 它不尊重菜单项的宽度。
I want to create context menu in C# which items are images of different heights and widths.
Main problem I don't know how to solve is how to set width and height for menu items and context menu.
If autosize for menu items is enabled, then heights of all menu items are the same. If I disable autosize for menu items, then I cannot properly set the width of context menu - it is not respecting widths of menu items.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请尝试这个场景:
Please try this scenario: