malu05 Posted January 28, 2009 Share Posted January 28, 2009 I created this tool that works like a database viewer. And it worked flawlessly until the databases began to exceeded the 4097 control item limit per window. Then the GUICtrlCreateListViewItem returned 0 for every new item. How can I approach this problem, and have no limit in how many items i can have in my Listview? [center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 28, 2009 Moderators Share Posted January 28, 2009 malu05,From the Help file for 3.3.0.0:GUI_MAXCONTROLS 65532 Maximum number of controls in GUI boxI know it is not an answer, but from where do you get a limit of 4097?M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
malu05 Posted January 28, 2009 Author Share Posted January 28, 2009 malu05, From the Help file for 3.3.0.0: GUI_MAXCONTROLS 65532 Maximum number of controls in GUI box I know it is not an answer, but from where do you get a limit of 4097? M23 #65358 and... expandcollapse popup.... Created Listviewitem: 4017 Created Listviewitem: 4019 Created Listviewitem: 4021 Created Listviewitem: 4023 Created Listviewitem: 4025 Created Listviewitem: 4027 Created Listviewitem: 4029 Created Listviewitem: 4031 Created Listviewitem: 4033 Created Listviewitem: 4035 Created Listviewitem: 4037 Created Listviewitem: 4039 Created Listviewitem: 4041 Created Listviewitem: 4043 Created Listviewitem: 4045 Created Listviewitem: 4047 Created Listviewitem: 4049 Created Listviewitem: 4051 Created Listviewitem: 4053 Created Listviewitem: 4055 Created Listviewitem: 4057 Created Listviewitem: 4059 Created Listviewitem: 4061 Created Listviewitem: 4063 Created Listviewitem: 4065 Created Listviewitem: 4067 Created Listviewitem: 4069 Created Listviewitem: 4071 Created Listviewitem: 4073 Created Listviewitem: 4075 Created Listviewitem: 4077 Created Listviewitem: 4079 Created Listviewitem: 4081 Created Listviewitem: 4083 Created Listviewitem: 4085 Created Listviewitem: 4087 Created Listviewitem: 4089 Created Listviewitem: 4091 Created Listviewitem: 4093 Created Listviewitem: 4095 Created Listviewitem: 4097 Created Listviewitem: 0 Created Listviewitem: 0 Created Listviewitem: 0 Created Listviewitem: 0 Created Listviewitem: 0 Created Listviewitem: 0 Created Listviewitem: 0 Created Listviewitem: 0 Created Listviewitem: 0 .... [center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center] Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 28, 2009 Share Posted January 28, 2009 (edited) I created this tool that works like a database viewer. And it worked flawlessly until the databases began to exceeded the 4097 control item limit per window. Then the GUICtrlCreateListViewItem returned 0 for every new item. How can I approach this problem, and have no limit in how many items i can have in my Listview? Are you running the current version (3.3.0.0)? This demo adds items in blocks of 8,192 (8K): expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GuiOnEventMode", 1) Global $listview, $button, $iItem = 1 GUICreate("listview items", 225, 250, 100, 200) GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit") $listview = GUICtrlCreateListView(" Item No. ", 10, 10, 205, 180) GUICtrlSetOnEvent(-1, "_ListView") $button = GUICtrlCreateButton("Add Items", 75, 200, 75, 30) GUICtrlSetOnEvent(-1, "_Button") GUISetState() While 1 Sleep(20) WEnd Func _Button() ; Add items in 8K blocks For $i = $iItem To $iItem + 8191 $iCtrlID = GUICtrlCreateListViewItem("Item " & $i, $listview) If $iCtrlID = 0 Then ConsoleWrite("Debug: Failed to add item at $i = " & $i & @LF) ExitLoop Else GUICtrlSetOnEvent($iCtrlID, "_ListViewItem") EndIf Next $iItem = $i EndFunc ;==>_Button Func _ListView() ConsoleWrite("listview clicked = " & @GUI_CtrlId & @LF) EndFunc ;==>_ListView Func _ListViewItem() ConsoleWrite("listview item clicked, ID = " & @GUI_CtrlId & " Text = " & GUICtrlRead(@GUI_CtrlId) & @LF) EndFunc ;==>_ListView Func _Quit() Exit EndFunc ;==>_Quit Edit: Better demo in event mode. Edited January 28, 2009 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
malu05 Posted January 28, 2009 Author Share Posted January 28, 2009 Are you running the current version (3.3.0.0)? This demo adds items in blocks of 8,192 (8K): #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $listview, $button, $i = 1 GUICreate("listview items", 225, 250, 100, 200) $listview = GUICtrlCreateListView(" Item No. ", 10, 10, 205, 180) $button = GUICtrlCreateButton("Add Items", 75, 200, 75, 30) GUISetState() While 1 Switch GUIGetMsg() Case $button ; Add items in 8K blocks For $i = $i To $i + 8191 If Not GUICtrlCreateListViewItem("Item " & $i, $listview) Then ConsoleWrite("Debug: Failed to add item at $i = " & $i & @LF) ExitLoop EndIf Next Case $listview MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Seems like i forgot to update it all... Just reinstalled it and now it works ^^ [center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 28, 2009 Moderators Share Posted January 28, 2009 I do not want to say "I told you so", but............ :-) M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now