|
-
Feb 11th, 2012, 11:52 PM
#1
Thread Starter
New Member
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
-
Feb 12th, 2012, 12:20 AM
#2
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
-
Feb 12th, 2012, 12:31 AM
#3
Thread Starter
New Member
Re: User Control Help with Constant
works perfectly thank you
-
Feb 12th, 2012, 12:43 AM
#4
Re: User Control Help with Constant
 Originally Posted by joelstoner
works perfectly thank you
Don't forget to read the first line of my signature
-
Feb 12th, 2012, 01:05 AM
#5
Thread Starter
New Member
Re: User Control Help with Constant
 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.
-
Feb 12th, 2012, 01:10 AM
#6
Re: User Control Help with Constant
 Originally Posted by joelstoner
Good thing you posted that, i didn't even know there was a rating system.
Thanks, i got it
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
|