Jump to content

[Solved in v3.2.13.8] _GUICtrlListView_SetGroupInfo $LVGS_COLLAPSIBLE $LVGS_COLLAPSED only can do in one of the groups


TalivanIBM
 Share

Recommended Posts

Hi, i have this problem with one of my scripts, i create in a GuiCtrlCreateListview approx. 30 groups with some items inside each group, well, i would set to all groups this two States with the function _GuiCtrlListView_SetGroupInfo, $LVGS_COLLAPSED and $LVGS_COLLAPSIBLE, but the result is the first of the groups collapsed and collapsible:

GUICtrlSetState($gcAfegir, $GUI_DISABLE)
      GUICtrlSetState($gcTreure, $GUI_DISABLE)
      GUICtrlSetState($gcM_E_Bot, $GUI_DISABLE)
      GUICtrlSetState($gcM_E_Prog, $GUI_DISABLE)
      _GUICtrlListView_EnableGroupView($gcList)
      $gc_c_name = _GUICtrlListView_AddColumn($gcList, "Nom", 100)
      $gcList_C_HI = _GUICtrlListView_AddColumn($gcList, "Obertura", 50, 2)
      $gcList_C_HF = _GUICtrlListView_AddColumn($gcList, "Tancament", 50, 2)
      $gcList_C_ObDiu = _GUICtrlListView_AddColumn($gcList, "ObDiumenge", 50, 2)
      $gcList_C_TaDiu = _GUICtrlListView_AddColumn($gcList, "TaDiumenge", 50, 2)
      ProgressOn("Carregant llista Valvi", "Carregant", "Un moment si us plau")
      $a = 0
      For $i = 1 To $Botigues[0][0]
          $codi = $Botigues[$i][1]
          $iniIP = "192.168." & $codi
          $ID = _GUICtrlListView_InsertGroup($gcList, -1, $i, $Botigues[$i][0])
          For $i2 = 1 To $Botigues[$i][2]
              If $ADSL = 0 Then
                  GUICtrlCreateListViewItem("|" & $iniIP & ".10|||ADSL", $gcList)
                  $iIndex = _GUICtrlListView_FindInText($gcList, $iniIP & ".10")
                  _GUICtrlListView_SetItemGroupID($gcList, $iIndex, $i)
                  _GUICtrlListView_SetItemImage($gcList, $iIndex, 2)
                  $ADSL = 1
              EndIf
              If $RDSI = 0 Then
                  GUICtrlCreateListViewItem("|" & $iniIP & ".11|||RDSI", $gcList)
                  $iIndex = _GUICtrlListView_FindInText($gcList, $iniIP & ".11")
                  _GUICtrlListView_SetItemGroupID($gcList, $iIndex, $i)
                  _GUICtrlListView_SetItemImage($gcList, $iIndex, 2)
                  $RDSI = 1
              EndIf
              If $i2 = 1 Then
                  $IP = $iniIP & ".200"
                  GUICtrlCreateListViewItem("|" & $IP & "|||S: " & StringUpper($CodiPC[_ArraySearch($CodiPC, $Codis[_ArraySearch($Codis, $codi, 0, 0, 0, 0, 1, 1)][0])][1]), $gcList)
                  $iIndex = _GUICtrlListView_FindInText($gcList, $IP)
                  _GUICtrlListView_SetItemGroupID($gcList, $iIndex, $i)
              Else
                  $IP = $iniIP & ".20" & $i2
                  GUICtrlCreateListViewItem("|" & $IP, $gcList)
                  $iIndex = _GUICtrlListView_FindInText($gcList, $IP)
                  _GUICtrlListView_SetItemGroupID($gcList, $iIndex, $i)
                  TCPStartup()
                  _GUICtrlListView_SetItemText($gcList, $iIndex, _TCPIpToName($IP), $gc_c_name)
                  TCPShutdown()
              EndIf
              _GUICtrlListView_SetItemImage($gcList, _GUICtrlListView_FindInText($gcList, $iniIP), 2)
          Next
          $ADSL = 0
          $RDSI = 0
          For $i2 = 1 To $Botigues[$i][3]
              $Horari = StringSplit($Botigues[$i][5], "|")
              $Diumege = StringSplit($Botigues[$i][6], "|")
              GUICtrlCreateListViewItem("|" & $iniIP & ".10" & $i2 & "|||Caixa " & $i2 & "|" & $Horari[2] & "|" & $Horari[3] & "|" & $Diumege[2] & "|" & $Diumege[3], $gcList)
              $iIndex = _GUICtrlListView_FindInText($gcList, $iniIP & ".10" & $i2)
              _GUICtrlListView_SetItemGroupID($gcList, $iIndex, $i)
              _GUICtrlListView_SetItemImage($gcList, $iIndex, 2)
          Next
          If $Botigues[$i][4] = 15 Then
              GUICtrlCreateListViewItem("|" & $iniIP & ".15|||Pasarel·la", $gcList)
              $iIndex = _GUICtrlListView_FindInText($gcList, $iniIP & ".15")
              _GUICtrlListView_SetItemGroupID($gcList, $iIndex, $i)
              _GUICtrlListView_SetItemImage($gcList, $iIndex, 2)
          EndIf
          _GUICtrlListView_SetGroupInfo($gcList, _GUICtrlListView_GetItemGroupID($gcList, _GUICtrlListView_FindInText($gcList, $iniIP & ".200")), $Botigues[$i][0], 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED)
          ProgressSet($a)
          $a = $i * 3 + 5 
      Next
      ProgressOff()

I have proved

_GUICtrlListView_SetGroupInfo($gcList, $ID, $Botigues[$i][0], 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED)

and

_GUICtrlListView_SetGroupInfo($gcList, $ID, $Botigues[$i][0], 0, $LVGS_COLLAPSIBLE)

and

_GUICtrlListView_SetGroupInfo($gcList, $ID, $Botigues[$i][0], 0, $LVGS_COLLAPSED)

and always is the first group with all/one of the states, why?

P.D.: i have change the function _GUICtrlListView_SetGroupInfo in the GuiListView.au3 to always put the $LVGS_COLLAPSIBLE and don't work.

Edited by TalivanIBM
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...