| | |
Problem in uncheck the checkBox
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 1
Reputation:
Solved Threads: 0
Hi all,
I am working in windows based application. In this application, a form contains 11 panels as 11 rows. I mean 11 panel as one by one. Each panel consits 11 checkBoxes without text only checkBoxes. if I check any one of the checkBox in any row, i need to provide a functionalites to uncheck all ohther checkBoxes if checked anyone before else the checked checkBox should be checked. if i check another one checkbox on the same row, then the previous selected checkBox should be uncheck automatically. I should not be uncheck checkbox directly. I need to achieve this by check other checkbox on the same row......
The user should not uncheck any checkboxes on the row directly. They can uncheck the checkboxes by selcecting other checkbox.
the user tries to uncheck the same checkBox dirctly by clicking on it. I need to prevent the user to uncheck the checkBox by click on the same checkbox. Instead of that the user shuld select rest of them( remainging checkBox on the same row). If the user select the second checkBox then the previus checkBox is automatically unchecked and the second checkBox is checked.
How to do that?
Thanks
RE
I am working in windows based application. In this application, a form contains 11 panels as 11 rows. I mean 11 panel as one by one. Each panel consits 11 checkBoxes without text only checkBoxes. if I check any one of the checkBox in any row, i need to provide a functionalites to uncheck all ohther checkBoxes if checked anyone before else the checked checkBox should be checked. if i check another one checkbox on the same row, then the previous selected checkBox should be uncheck automatically. I should not be uncheck checkbox directly. I need to achieve this by check other checkbox on the same row......
The user should not uncheck any checkboxes on the row directly. They can uncheck the checkboxes by selcecting other checkbox.
the user tries to uncheck the same checkBox dirctly by clicking on it. I need to prevent the user to uncheck the checkBox by click on the same checkbox. Instead of that the user shuld select rest of them( remainging checkBox on the same row). If the user select the second checkBox then the previus checkBox is automatically unchecked and the second checkBox is checked.
How to do that?
Thanks
RE
•
•
Join Date: Aug 2008
Posts: 15
Reputation:
Solved Threads: 1
how are you handling your click event? I would put a clause in there to say that if it is a user generated click then check the box again esentially undoing their uncheck immediately. perhaps someone has a more elegant way of doing it.
so:
Private Sub CheckBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.Click
If CheckBox1.Checked = False Then
CheckBox1.Checked = True
End If
End Sub
This might help but it will also depend on whatever else you are doing in your event handlers
hope this helps. let me know how it goes
so:
Private Sub CheckBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.Click
If CheckBox1.Checked = False Then
CheckBox1.Checked = True
End If
End Sub
This might help but it will also depend on whatever else you are doing in your event handlers
hope this helps. let me know how it goes
•
•
Join Date: Oct 2008
Posts: 9
Reputation:
Solved Threads: 0
MAYTHIS WILL HELP...
HAVE FUN
VB.NET Syntax (Toggle Plain Text)
Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click Dim ctrl As Control Dim txt As TextBox Dim chkb As CheckBox For Each ctrl In Me.Controls If (ctrl.GetType() Is GetType(TextBox)) Then txt = CType(ctrl, TextBox) txt.Text = "" End If If (ctrl.GetType() Is GetType(CheckBox)) Then chkb = CType(ctrl, CheckBox) chkb.Checked = False End If Next End Sub
HAVE FUN
Last edited by hisheeraz; Oct 14th, 2008 at 2:14 pm.
![]() |
Similar Threads
- Outlook Express Won't Start (msimn.exe goes to 98% cpu usage) (Windows Software)
- problem for javascript (JavaScript / DHTML / AJAX)
- struts-html:checkbox default checked (JSP)
- checkbox in datagridview c# (C#)
- Asp,ms Access,iis (ASP)
- Help, really strange problem (Viruses, Spyware and other Nasties)
- problem in sending mail form web application (ASP.NET)
- Windows Media Player 10 Screw Up (Windows NT / 2000 / XP)
- Error message, posting HijackThis log (Viruses, Spyware and other Nasties)
Other Threads in the VB.NET Forum
- Previous Thread: Convert Video file to Thumbnails
- Next Thread: can someone help me with this problem with arrays?
Views: 1455 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2008 access add advanced application array basic beginner browser button buttons center class click client code combo convert cpu cuesent data database datagrid datagridview datetimepicker design designer dissertation dissertations dissertationtopic eclipse employees excel exists forms function html images lib listview map mobile module msaccess mysql net number open page pan pdf picturebox picturebox2 port position print printing printpreview problem refresh regex reuse richtextbox right-to-left save search serial settings socket sorting sqldatbase sqlserver storedprocedure studio textbox timer timespan transparency txttoxmlconverter usercontol vb vb.net vb2008 vba vbnet vista visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web webbrowser winsock wpf wrapingcode xml year





