开发者

C# Windows Forms Programming user control which consists of three images

I try to create a user control (button). The button background consists of three images. The left border of the button, the r开发者_JAVA百科ight border and middle part that stretched depending on the text. How can I realized this?


Basically, you have to derive from Button (or Control, depends how deep you want to go) and override OnPaint. You will have to handle all states (normal, pushed) and be responsible for refreshing them. Like here for example:

http://christian-helle.blogspot.com/2007/09/buttonex-owner-drawn-button-control.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜