cancel
Showing results for 
Search instead for 
Did you mean: 

TimeDelay in Selecting CheckBox

Former Member
0 Kudos

Hi To All,

I am having 5 CheckBoxes in my screen..In that 5th CheckBox is SelectAll checkbox. If i select that 5th Checkbox, al the other 4 Checkboxes should be selected at once..Wats my problem is, if i select the 5th checkbox after 4 to 5 seconds all the other 4 checkboxes got checked..How to overcome this time delay is selecting checkbox...Here is my source...


    Try
            Conv_Form = app.Forms.Item("AWReport")
            Conv_Form.Freeze(True)
            Dim Chk1 As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chk1").Specific
            Dim Chk2 As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chk2").Specific
            Dim Chk3 As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chk3").Specific
            Dim Chk4 As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chk4").Specific
            Dim ChkALL As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chkAll").Specific
            Select Case pVal.EventType
                Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
                    If pVal.ItemUID = "chkALL" And pVal.BeforeAction = False Then
                        If ChkALL.Checked = "True" Then
                            Chk1.Checked = "True"
                            Chk2.Checked = "True"
                            Chk3.Checked = "True"
                            Chk4.Checked = "True"
                        Else
                            Chk1.Checked = "False"
                            Chk2.Checked = "False"
                            Chk3.Checked = "False"
                            Chk4.Checked = "False"
                            ChkALL.Checked = "False"
                        End If
                    End If
             Conv_Form.Freeze(False)
        Catch ex As Exception
            Conv_Form.Freeze(False)
        End Try
    End Sub

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

just comment or remove the line:

chkALL.Checked=False in else part of the if statement.

I hope it will work...

Sandeep

Former Member
0 Kudos

Hi Sandeep,

I had already solved this issue..Thanks a lot for ur response...

Regards

Sridhar R

Former Member
0 Kudos

Sridhar,

try to write, where was the problem in your code. Few members tried to help you and it would be good to know, what was the point

thx

Former Member
0 Kudos

Hi Petr,

Sorry, I dint think in that way, wat u had mentioned........Here is my issue.......

What my need is if i check the SelectAll checkbox al the other checkboxes shd be checked..If i uncheck the SelectAll, al shd get unchecked..I found somewhat difficulties while doing this issue..So i had chaged my need..If i uncheck the SelectAll checkbox al other check boxes will not be unchecked. Here is my source...


 Try
     If pVal.BeforeAction = False Then
       Select Case pVal.EventType
         Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
              Select Case pVal.ItemUID
                   Case "chkALL"
                      If ChkALL.Checked = True Then
                         Conv_Form.Freeze(True)
                         Chk1.Checked = True
                         Chk2.Checked = True
                         Chk3.Checked = True
                         Chk4.Checked = True
                         Conv_Form.Freeze(False)
                      End if
   Case "chk1"
   If Chk1.Checked = False And ChkALL.Checked = True Then
   ChkALL.Checked = False
   End If
   Case "chk2"
   If Chk2.Checked = False And ChkALL.Checked = True Then
   ChkALL.Checked = False
   End If
   Case "chk3"
   If Chk3.Checked = False And ChkALL.Checked = True Then
   ChkALL.Checked = False
   End If
   Case "chk4"
   If Chk4.Checked = False And ChkALL.Checked = True Then
   ChkALL.Checked = False
   End If

Former Member
0 Kudos

Hi,

Can you place this under CLICK event and check(I'm Not sure it works fine or not)

If pVal.ItemUID = "chkALL" And pVal.BeforeAction = False and pval.eventType=SAPBoUICOM.BoEventTypes.et_Then

Sandeep

Former Member
0 Kudos

Thanks for ur repsonse Sandeep..But till now same problem occurs....