M
Minerva Jones
I'm using CF2.0 on WM5.
As in the subject, I need to create a Label with a tiny bit of extra
functionality. So I create a new user control, change :UserControl to
:Label and away I go. The thing is I need to override OnPaint, and
whilst it allows me to from a compiler POV (and just typing override
offers OnPaint as part of the list - so it's virtual), it doesn't get
called - ever.
Label is derived directly from Control, and if I switch to deriving
from Control myself, then OnPaint starts to get called! So how come it
doesn't when I'm derived from Label? Is Label doing something to block
my override, if so, how/what - and surely if it was sealed or not a
virtual method, the compiler would pick it up?
Incidentally, doing the exact same thing with a desktop project works
fine, OnPaint from a Label derived control always gets called.
Thanks for any help.
As in the subject, I need to create a Label with a tiny bit of extra
functionality. So I create a new user control, change :UserControl to
:Label and away I go. The thing is I need to override OnPaint, and
whilst it allows me to from a compiler POV (and just typing override
offers OnPaint as part of the list - so it's virtual), it doesn't get
called - ever.
Label is derived directly from Control, and if I switch to deriving
from Control myself, then OnPaint starts to get called! So how come it
doesn't when I'm derived from Label? Is Label doing something to block
my override, if so, how/what - and surely if it was sealed or not a
virtual method, the compiler would pick it up?
Incidentally, doing the exact same thing with a desktop project works
fine, OnPaint from a Label derived control always gets called.
Thanks for any help.