Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Usage value of properties
#1
Hi, I have a little question here

I'm using a lot of properties but I don't know what value to use in my other subs. I find it hard to explain so I have an example:

[code2=vbnet]'This is the property itself
Private _TextCancelButton As String = "Cancel"
<Category("TextFields"), Description("The text shown in the Cancel button"), DefaultValue("Cancel")>
Public Property TextCancelButton() As String
Get
Return _TextCancelButton
End Get
Set(value As String)
_TextCancelButton = value
cmdCancel.Text = _TextCancelButton
End Set
End Property[/code2]

Now what should I use know to change the text of the Cancel button, for example when another button is clicked?

[code2=vbnet]cmdCancel.Text = _TextCancelButton
'or
cmdCancel.text = TextCancelButton[/code2]


I think it is the same, or not?

Thanks, Brecht


Messages In This Thread
Usage value of properties - by brco900033 - 08-31-2013, 06:13 AM
Re: Usage value of properties - by Snake_eyes - 09-11-2013, 09:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Properties for UserControl brco900033 4 15,864 04-27-2013, 05:01 AM
Last Post: brco900033

Forum Jump:


Users browsing this thread: 1 Guest(s)