TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
rudi 0
NA
1
0
c# new modifier
Aug 19 2004 3:41 AM
Hi Guys, I'm having a few problems getting the new modifier to work on a usercontrol. I am trying to hide (or shadow, in VB terms) the 'Enabled' property of a usercontrol so that i can do funky stuff with it when it is disabled. However, it is not hitting my method .... it is disabling the usercontrol, but does not hit my method? has anyone else had this issue?? or has anyone got any ideas as to why this is happening?? Here is my method: new public bool Enabled { get { return txtWebAddress.Enabled; } set { this.TabStop = value; txtWebAddress.Enabled = value; btnLaunchUrl.Enabled = value; if(!value) { txtWebAddress.BackColor = Color.FromKnownColor (ColorConsts.COLOR_READONLY); btnLaunchUrl.BackColor = Color.FromKnownColor (ColorConsts.COLOR_READONLY); } else { txtWebAddress.BackColor = this.BackColor; btnLaunchUrl.BackColor = this.BackColor; } } } It doesn't make any difference if i try putting the new before or after the public keyword. I am setting the property by looping through all the conytrols on a form and setting their enabled property, polymorphism should make this happen... shoudl it not??? Thanks Ian Moores
Reply
Answers (
3
)
.net compatibility with palm os ver5.xx
How to run the exe which is created by C# compiler.