Jump to content

limit in treeview item?


nobbe
 Share

Recommended Posts

hi

im am inserting items into the treeview but i am stuck at exactly 4088 items

is there another way to increase the limit here??

tnx

$TreeView1 = GUICtrlCreateTreeView($leftMargin, $topMargin, $leftVSplit - $leftMargin, $topHSplit - $topMargin, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)

; all sorted tracks now..
    For $i = 1 To $numtracks
        $data = StringSplit($itunes_ALLTRACK[$i], '|')
        $artist = $data[1];
        
        If $artist <> $oldartist Then

            $anz = $anz + 1 

            $atvItem[$i] = GUICtrlCreateTreeViewItem($anz & " " & $artist, $TreeView1) ;        
                                EndIf
        $oldartist = $artist
    Next
Link to comment
Share on other sites

There is limit 4096 window controls in AutoIt GUI.

By the GUICtrlCreateTreeViewItem() is created window control for that treeview item.

This limit can be overcome by using WIN API TVM_INSERTITEM instead of using GUICtrlCreateTreeViewItem()

but for this you need to know little more about DllStructCreate() and such.

Search forum for examples and look at Auto3Lib from PaulIA.

Edited by Zedna
Link to comment
Share on other sites

There is limit 4096 window controls in AutoIt GUI.

Search forum for examples and look at Auto3Lib from PaulIA.

hi thanks a lot

this is working now with pauls UDF !

Func AddNodes()
    $max = 1000;
    $max_n = 10000;

    ReDim $hNode[$max + 1]
    ReDim $subNode[$max_n + 1]

    _TreeView_BeginUpdate($hTree) ; no update 

    $max_n =1;

    For $i = 1 To $max
        $hNode[$i] = _TreeView_Add ($hTree, 0, $i)
          $subNode[$max_n] = _TreeView_AddChild($hTree, $hNode[$i], "Sub node " & $max_n)
            $max_n = $max_n +1;
          $subNode[$max_n] = _TreeView_AddChild($hTree, $hNode[$i], "Sub node " & $max_n)
            $max_n = $max_n +1;
          $subNode[$max_n] = _TreeView_AddChild($hTree, $hNode[$i], "Sub node " & $max_n)
            $max_n = $max_n +1;
    Next
    _TreeView_EndUpdate($hTree); do update  again .

    
EndFunc   ;==>AddNodes
Link to comment
Share on other sites

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...