Re: Problem with my project
Try this...
Code:
Dim x As Integer = 3
Me.FlowLayoutPanel1.Controls("Button" & x.ToString).Hide()
Re: Problem with my project
Quote:
Originally Posted by
.paul.
Try this...
Code:
Dim x As Integer = 3
Me.FlowLayoutPanel1.Controls("Button" & x.ToString).Hide()
Thanks I will try it tomorrow and let u know
Re: Problem with my project
Quote:
Originally Posted by
.paul.
Try this...
Code:
Dim x As Integer = 3
Me.FlowLayoutPanel1.Controls("Button" & x.ToString).Hide()
Just a small thing for the record: you don't need the ToString in that case. It's not wrong and may be considered to add clarity but the concatenation operator always widens its operands to type String so any and every time it is used to already know that both operands will be converted to a String if they can be. Any operands that cannot be widened to type String cannot be used with the concatenation operator and would require an explicit conversion.
Re: Problem with my project
Quote:
Originally Posted by
.paul.
Try this...
Code:
Dim x As Integer = 3
Me.FlowLayoutPanel1.Controls("Button" & x.ToString).Hide()
Perfect it did work
One more thing: I set x = senderX.name that is the button witch I click to hide the other one and all works
I click button “1” and the “button1” hides I click button “2” and the “button2” hides but now I want that when I hide the (“button” & x.toSting) x= 2 I want that all the other buttons shows.
How can I do this?
I thought like me.flowlayoutpanel.controls( control.name.contains “button”).show exept me.flowlayoutpanel.controls(“button” & x.tostring) X=SenderX
Re: Problem with my project
Code:
For each b as Button in FlowLayoutPanel1.Controls.OfType(of Button)
b.Visible = True
Next
‘ now All buttons are visible hide your selected button here
Re: Problem with my project
Quote:
Originally Posted by
.paul.
Code:
For each b as Button in FlowLayoutPanel1.Controls.OfType(of Button)
b.Visible = True
Next
‘ now All buttons are visible hide your selected button here
thank u very mutch
Re: Problem with my project
Quote:
Originally Posted by
.paul.
Code:
For each b as Button in FlowLayoutPanel1.Controls.OfType(of Button)
b.Visible = True
Next
‘ now All buttons are visible hide your selected button here
thank u very mutch