Property not working

  • Thread starter Thread starter WStoreyII
  • Start date Start date
W

WStoreyII

I have created a class that inherits a treeview control
this class will populate the tree view with nodes that contain all the years
between the
start number and the end number

my problem is that i have set a property for the control
that will get these numbers and then i used the variables in the init_tree
sub that i created

i have the property set up like this
there is a private Begin as integer in the declarations and the property
follows

Public Property Year_Begin () as integer
get
return begin
end get
set
begin = value
end set
end property

but when i use these values in my sub it does not work
there is no error message
just there is no data to be manipulated

the sub works becuase i manually added values to the begin and end
but when i try to set it up to work off of the property values it does not .

What am i doing wrong?

WStoreyII
 
Hi,

You need to use a private variable in the class to store the info
and return that.

Public class MyClass
Dim mintBegin as integer

Public Property Year_Begin () as integer
get
return mintbegin
end get
set
mintbegin = value
end set
end property

End Class

Ken
 
Back
Top