Click here to Skip to main content
15,904,348 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello guys !
How can I show and hide a control or other detail with checkbox ?
I have 2 image with the link for reference bellow !

http://prntscr.com/mir395
http://prntscr.com/mir365


Thanks you for your help!

What I have tried:

I have no idea !
For now I just know Groupbox or CheckgroupBox like this article : CheckGroupBox and RadioGroupBox[^]
Posted
Updated 9-Feb-19 3:03am
Comments
Richard MacCutchan 9-Feb-19 7:42am    
Add an event handler to your checkbox so you get a notification when it is set or unset.
Maciej Los 9-Feb-19 8:16am    
Image is not description...

You would want your code to evaluate the checked property of the checkbox to make the determination on whether to hide other controls.

Here is the link to the documentation specifically for the Checked property for a checkbox control for Visual Basic DotNet.
 
Share this answer
 
Check this: CheckBox.Checked Property (System.Windows.Forms) | Microsoft Docs[^]

VB
Private Sub CheckBox1_CheckedChanged(sender as Object, e as EventArgs) _ 
     Handles CheckBox1.CheckedChanged

   OtherControl.Visible = CheckBox1.Checked

End Sub
 
Share this answer
 
Set Visible property to the checkbox Checked property.

So When checkbox is checked visibility sets to True
And when checkbox is unchecked visibility sets to false
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900