|
-
Jan 5th, 2009, 12:15 AM
#1
[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
Last edited by weirddemon; Jan 5th, 2009 at 01:17 AM.
-
Jan 5th, 2009, 12:20 AM
#2
Frenzied Member
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
-
Jan 5th, 2009, 12:25 AM
#3
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
-
Jan 5th, 2009, 12:57 AM
#4
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?
-
Jan 5th, 2009, 01:08 AM
#5
Frenzied Member
Re: List box + button help
Code:
If List1.SelectedIndex = 1 Then
me.Button.Visible=FALSE
End If
-
Jan 5th, 2009, 01:16 AM
#6
Re: List box + button help
Thanks again. I guess I just need to think outside the box :P
-
Jan 5th, 2009, 01:22 AM
#7
Frenzied Member
Re: [RESOLVED] List box + button help
-
Jan 5th, 2009, 01:29 AM
#8
Re: [RESOLVED] List box + button help
Thanks for the info
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
|