P
Phill. W
Here's a knotty little problem.
I have some nasty little controls that needs to behave in a non-
windows-Standard way - don't ask why; it's a large application being
converted from some [much] older code and my users are adamant
that this behaviour mustn't change.
Specifically, I want to be able to set
myControl.Enabled = False
and, instead of the controls /actually/ being disabled, I want them to
/recolour/ themselves so that they /look/ disabled, but still respond to
Mouse events, can be copied from, and such like. (I realise the
ReadOnly property is going to be involved, here, but I don't think it
will do the whole job).
Adding to the complication; I thought I'd derive all of these controls
from a single ancestor UserControl and have that ancestor implement
an Interface containing the Enabled property (among other things), as in
Public Interface ITypeable
. . .
Property Enabled() as Boolean
. . .
Public Class Wrapper
Inherits UserControl
Implements ITypeable
. . .
Public Property Enabled() as Boolean _
Implements ITypeable.Enabled
And herein lies my problem.
The Enabled property already exists in UserControl, so when I try to
implement the Interface property, VB (2003) gets quite upset that the
specifiers or signatures on the Interface and Property don't match.
I've tried overloading, overriding, shadowing, and just about every
other modifier I can find on the Property and even overriding the
OnEnabledChanged routine, but I seem to be on a losing streak here.
Any Suggestions?
TIA,
Phill W.
I have a control that I don't want disabled when I set .Enabled = False,
when my code says
..Enabled = False
I have an application that uses UserConrols to
I have some nasty little controls that needs to behave in a non-
windows-Standard way - don't ask why; it's a large application being
converted from some [much] older code and my users are adamant
that this behaviour mustn't change.
Specifically, I want to be able to set
myControl.Enabled = False
and, instead of the controls /actually/ being disabled, I want them to
/recolour/ themselves so that they /look/ disabled, but still respond to
Mouse events, can be copied from, and such like. (I realise the
ReadOnly property is going to be involved, here, but I don't think it
will do the whole job).
Adding to the complication; I thought I'd derive all of these controls
from a single ancestor UserControl and have that ancestor implement
an Interface containing the Enabled property (among other things), as in
Public Interface ITypeable
. . .
Property Enabled() as Boolean
. . .
Public Class Wrapper
Inherits UserControl
Implements ITypeable
. . .
Public Property Enabled() as Boolean _
Implements ITypeable.Enabled
And herein lies my problem.
The Enabled property already exists in UserControl, so when I try to
implement the Interface property, VB (2003) gets quite upset that the
specifiers or signatures on the Interface and Property don't match.
I've tried overloading, overriding, shadowing, and just about every
other modifier I can find on the Property and even overriding the
OnEnabledChanged routine, but I seem to be on a losing streak here.
Any Suggestions?
TIA,
Phill W.
I have a control that I don't want disabled when I set .Enabled = False,
when my code says
..Enabled = False
I have an application that uses UserConrols to