|
-
Jan 31st, 2008, 12:55 PM
#1
[RESOLVED] [2005] text property of inherited label
how can i make the text property of an inherited label, unavailable to the user at design/run time, but still be able to use it within the class?
thanks
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jan 31st, 2008, 01:05 PM
#2
Re: [2005] text property of inherited label
Edit: Nevermind. I was way off base.
Last edited by Kasracer; Jan 31st, 2008 at 01:15 PM.
-
Jan 31st, 2008, 01:07 PM
#3
Re: [2005] text property of inherited label
I think the way to do this would be to override/shadow the Text property and make it private and then in your code when you want to change it, call MyBase.Text.
-
Jan 31st, 2008, 01:07 PM
#4
Re: [2005] text property of inherited label
Yes I believe theres no way to "hide" a member of an inherited class. The only way to do so is to not inherit the class, but rather encapsulate it within your class.
-
Jan 31st, 2008, 01:56 PM
#5
Re: [2005] text property of inherited label
its possible to make a property invisible like this
vb Code:
<Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public Overrides Property Text() As String
Get
Return MyBase.Text
End Get
Set(ByVal Value As String)
End Set
End Property
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jan 31st, 2008, 02:01 PM
#6
Re: [RESOLVED] [2005] text property of inherited label
Oh, I thought you wanted it to be invisible everywhere, except for inside the class itself.
-
Jan 31st, 2008, 03:03 PM
#7
Re: [RESOLVED] [2005] text property of inherited label
i found the code to make it invisible everywhere now
vb Code:
Imports System.ComponentModel
''this overrides the text property + hides it from the properties
''window + the code editor
<EditorBrowsable(EditorBrowsableState.Never)> _
<Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public Overrides Property Text() As String
Get
Return MyBase.Text
End Get
Set(ByVal Value As String)
End Set
End Property
Last edited by .paul.; Jan 31st, 2008 at 03:47 PM.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|