自定义按钮-鼠标悬停问题 [英] custom button - mouseover problem

查看:139
本文介绍了自定义按钮-鼠标悬停问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,专家,

我试图给一些按钮一个漂亮的外观.实际上,我从一些设计师那里获得了.png图像的外观,现在正试图让他们使用这些按钮.

图像不能完全填充矩形空间.相反,转角保持透明.

我为按钮添加了新属性:


  • NormalBackgroundImage
  • MouseoverBackgroundImage
  • DepressedBackgroundImage
  • Hi experts,

    I''m trying to give some buttons a nice look. In fact, I got the look from some designers as .png image and am now trying to get them to work on those buttons.

    The images do not completely fill a rectangular space. Instead, the corners are left transparent.

    I subclassed a button with new properties:


    • NormalBackgroundImage
    • MouseoverBackgroundImage
    • DepressedBackgroundImage

      • Backcolor = Transparent
      • Flatstyle = Flat
      • Flatappearence.Bordersize = 0

      • Backcolor = Transparent
      • Flatstyle = Flat
      • Flatappearence.Bordersize = 0

      推荐答案

      已解决.

      整个图像与灰色背景色无关.它是按钮固有的.因此,我从System.Drawing.Label中继承了我自己的按钮,对此感到满意.
      Solved.

      The whole image thing has nothing to do with the gray background colour. It''s button-inherent. So I subclassed my own button from System.Drawing.Label and am happy with it.


      这篇关于自定义按钮-鼠标悬停问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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