[RESOLVED] List box + button help
I currently have a List Box that, when an item is clicked, the information that I have written for it is displayed in a text box below it,
Code:
If List1.SelectedIndex = 0 Then
Text1.Text = "Test"
End If
I wanted to know if I could do the same thing with buttons. So, if I were to click on the list item with value "0", I want a specific button to show up. Or item value "1" and a different button takes it's place. I think you all understand where I'm going with this.
I thought that I could use the same thing, but instead of Text1.Text, maybe an indicator linking the button. I just wasn't sure how to do that or if that needed to happen.
Thanks
Re: List box + button help
Put a button on the form and set it to visible = false in the properties window
Code:
If List1.SelectedIndex = 0 Then
me.Button.Visible=true
End If
Re: List box + button help
Ah. Just reading your code, I saw that you are right and it makes perfect sense now.
Thank you very much
:D
Re: List box + button help
I have one more problem.
Is there a way to hide the button again once I click another item in the list or something along those lines?
Re: List box + button help
Code:
If List1.SelectedIndex = 1 Then
me.Button.Visible=FALSE
End If
Re: List box + button help
Thanks again. I guess I just need to think outside the box :P
Re: [RESOLVED] List box + button help
Re: [RESOLVED] List box + button help