How to override the paint on a command button.
From: John Mark Howell (jmarkhowell_at_hotmail.com)
Date: 05/26/04
- Next message: James Westgate [Crainiate]: "Re: How to override the paint on a command button."
- Previous message: Miro Durcik: "Re: .net chart object"
- Next in thread: James Westgate [Crainiate]: "Re: How to override the paint on a command button."
- Reply: James Westgate [Crainiate]: "Re: How to override the paint on a command button."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 26 May 2004 09:10:36 -0500
I have created a class that extends the System.Windows.Forms.Button class
and am attempting to create a shaded background by overriding the Paint
event. However, when you first place the control on the form, you see my
shaded background for about 1/2 a second then it changes and looks like a
normal button (gray with black text). However, when I resize it, you can
then see some of my shading (but not consistently).
What else would I need to do to override the redraw event?
BTW, I realize that I could create my own custom control (ie. panel with a
label inside) and override the paint on that, but I was trying to extend the
functionality that the Button already had (events, properties and the like).
Any ideas or will this just not work on a command Button?
- Next message: James Westgate [Crainiate]: "Re: How to override the paint on a command button."
- Previous message: Miro Durcik: "Re: .net chart object"
- Next in thread: James Westgate [Crainiate]: "Re: How to override the paint on a command button."
- Reply: James Westgate [Crainiate]: "Re: How to override the paint on a command button."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|