User Control Help with Constant
I am making my own customized Listbox. I am trying to include all the features of the listbox, such as Selected. However when my code in the application i am making the UserControl for, tries to set the List.Selected(Num) = False, I get an error "Assignment to a constant not permitted". Here is the code i have in the user control. What do i need to change or add to make it settable as well as readable?
Public Function Selected(Num As Integer) As Boolean
Selected = List1.Selected(Num)
End Function
Re: User Control Help with Constant
Try this
vb Code:
Public Property Get Selected(ByVal Index As Integer) As Boolean
Selected = List1.Selected(Index)
End Property
Public Property Let Selected(ByVal Index As Integer, ByVal New_Selected As Boolean)
List1.Selected(Index) = New_Selected
PropertyChanged "Selected"
End Property
Re: User Control Help with Constant
works perfectly thank you
Re: User Control Help with Constant
Quote:
Originally Posted by
joelstoner
works perfectly thank you
Don't forget to read the first line of my signature ;)
Re: User Control Help with Constant
Quote:
Originally Posted by
4x2y
Don't forget to read the first line of my signature ;)
Good thing you posted that, i didn't even know there was a rating system.
Re: User Control Help with Constant
Quote:
Originally Posted by
joelstoner
Good thing you posted that, i didn't even know there was a rating system.
Thanks, i got it :)