调整ToolStrip项目的图像大小 [英] Resizing ToolStrip item's image

查看:208
本文介绍了调整ToolStrip项目的图像大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以适合/调整ToolStrip项目的图像?我已经设置了属性 AutoSize = False ImageScaling = SizeToFit & 尺寸= 40,40 但只有项目的框大小调整(在图像周围留出空格),图像尺寸仍然是默认大小。

Is there any way I can fit/resize the image of ToolStrip item? I already set the property AutoSize = False , ImageScaling = SizeToFit & Size = 40, 40 but only the item's boxes resizing (leave spaces around image) and the image size is still with it's default size.

然后我想出了使用BackgroundImage插入图像而不是将其插入Image。我可以调整/调整图像大小,但问题是当我运行系统并将光标指向ToolStrip项目时,项目的图像消失。我找到了这个解决方案调整ToolStripButtons大小以适应完整的BackGround图像但我不知道我不知道如何使用 vb.net来应用它

I then came up with inserting the image using BackgroundImage instead of inserting it at Image. I can fit/resize the image but the problem is when I run my system and pointing the cursor on the ToolStrip item, the item's image disappear. I found this solution Resizing ToolStripButtons to fit complete BackGround image but I don't know how to apply it using vb.net

请帮助我。谢谢。

推荐答案

如果您希望图片以原始尺寸显示


  • AutoSize 属性 ToolStrip 设置为 true

  • 设置 ImageScaling 属性> ToolStripItem

  • Set AutoSize property of ToolStrip to true
  • Set ImageScaling property of ToolStripItem to None

如果你想要你的图像以特定尺寸显示


  • 设置 AutoSize 属性 ToolStrip true

  • 设置 ImageScalingSize 属性 ToolStrip 到您的特定大小,例如 32,32

  • ImageScaling 属性 ToolStripItem 设置为 SizeToFit

  • Set AutoSize property of ToolStrip to true
  • Set ImageScalingSize property of ToolStrip to your specific size, for example 32,32
  • Set ImageScaling property of ToolStripItem to SizeToFit

这篇关于调整ToolStrip项目的图像大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆