Sign in to follow this  
Followers 0
Synapse

GUICtrlCreateList limited?

16 posts in this topic

#1 ·  Posted (edited)

Hi...i made a program that imports a list from an ini file to a GUICtrlCreateList....but i saw that the GUICtrlCreateList doesn`t show my entire list y? is that....is GUICtrlCreateList limited to a fix number of lines?

Please help me....or show me a work around with this....THX <_<

Edited by Synapse

Share this post


Link to post
Share on other sites



Maybe it's not showing the scrollbars? Maybe you have items with the same name and they are only put there once?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Posting you're code might help, if possible. I've never seen a problem with lists being too long... And there's nothing in the helpfile about the maximum size (that I saw...). NEVERMIND

Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Are there more than 4000 items in this list?

GUI_MAXWINDOWS 1024 Maximum number of simultaneous windows.

GUI_MAXCONTROLS 4093 Maximum number of controls in GUI box.

GUI_MAXCOLOURS 32 Maximum number of colour brushes to cache

GUI_MAXPOINTS 256 Maximum number of points by graphic info page.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Are there more than 4000 items in this list?

I think limit 4000 items is only in ListView where each item represents window control in AutoIt implementation.

In ListBox there are only items indexes (and not items controls) as far as I know so there is not AutoIt limit.

If there is some limit it will be probably Windows ListBox's limit if ever.

Share this post


Link to post
Share on other sites

I think limit 4000 items is only in ListView where each item represents window control in AutoIt implementation.

In ListBox there are only items indexes (and not items controls) as far as I know so there is not AutoIt limit.

If there is some limit it will be probably Windows ListBox's limit if ever.

He said list... Not items, and this made me think that he was trying something like:
GUICreate("")
For $iCC = 1 To 5000
    GUICtrlCreateList($iCC, 100,100)
Next

GUISetState ()

While GUIGetMsg() <> -3
WEnd
Which shows he would reach the limitation.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

He said list... Not items, and this made me think that he was trying something like:

GUICreate("")
For $iCC = 1 To 5000
    GUICtrlCreateList($iCC, 100,100)
Next

GUISetState ()

While GUIGetMsg() <> -3
WEnd
Which shows he would reach the limitation.
Yes this would reach 4000 limit

but see what he said:

Hi...i made a program that imports a list from an ini file to a GUICtrlCreateList....but i shaw that the GUICtrlCreateList doesn`t show my entire list y? is that....is GUICtrlCreateList limited to a fix number of lines?

From that it's clear he means ListBox (GUICtrlCreateList in AutoIt) and makes items (lines) which reaches some limit.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Yes this would reach 4000 limit

but see what he said:

From that it's clear he means ListBox (GUICtrlCreateList in AutoIt) and makes items (lines) which reaches some limit.

Yeah, this just to prove you're right in what you said:
#include <GuiList.au3>
GUICreate("")
$hList = GUICtrlCreateList("", 100,100)
For $iCC = 1 To 9999
    _GUICtrlListAddItem($hList, StringFormat('%04d', $iCC))
Next

GUISetState ()

While GUIGetMsg() <> -3
WEnd
(StringFormat to keep the numbers in order, seems they are automatically sorted ?? )

Edit:

Forgot the include.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

(StringFormat to keep the numbers in order, seems they are automatically sorted ?? )

GUICtrlCreateList has default style containing $LBS_SORT

so if you don't want it to be sorted then use:

#include <GuiList.au3>
#include <GuiConstants.au3>

GUICreate("")
$hList = GUICtrlCreateList("", 100,100, 200,200, BitOR($WS_BORDER, $WS_VSCROLL))
For $iCC = 1 To 5000
;~     _GUICtrlListAddItem($hList, StringFormat('%04d', $iCC))
    _GUICtrlListAddItem($hList, $iCC)
Next

GUISetState ()

While GUIGetMsg() <> -3
WEnd

But about limitation I don't know. Maybe some 32 KB or 64 KB limit?

Share this post


Link to post
Share on other sites

I apreciate all the replys...here is my code...at least the part where the reading of the ini file and the listing of it...

Global $var = IniReadSection(@ScriptDir&"\repository.ini", "soft")
If @error Then
     MsgBox(0, "Error !", "No repository file found !")
     Exit
EndIf

;=======>List
$List = GUICtrlCreateList("",10, $ListTop, $width-25, $height-240, $WS_VSCROLL+$LBS_SORT , 0)


;========Function that creates the list
Func _CreateList()
    For $i = 1 To $var[0][0]
        GUICtrlSetData($List, $var[$i][0])
    Next
EndFunc

No i don`t have 4 the moment more then 4000 lines in it..but eventualy i will... is 4000 the limit of it?

Anyway my program is posted at this adress http://thesynapseproject.org in the releases topic...in order to function u need to download the repository.dat file from the "repository" topic...

THX once again..

Share this post


Link to post
Share on other sites

You might wanna search forum for "ini limit"


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

You might wanna search forum for "ini limit"

Why...ini`s have a line limit in every section ??? i didn`t knew...and i couldn`t find nothing about this....

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Hello !

i have to confirm the suspected fact. this is part of my script i'm working on:

deleted

the list view terminates in row 5258. the number of elements (row*col) is about 94662. the final message box prooves that the array is complete and it is not the "ini limitation". please can anyone explain the limit or help me out ?

j.

Edited by jennico2

My contributions:Universal translator with national keyboards and Unicode support.Unicode editor with national keyboards and editing features.

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

getting used to not getting any reply in this forum....poor

so, if someone reads this, there is a line in the help file:

"This function creates the individual ListView items that can be selected. The items function as normal controls and can be set with GUICtrlSetData.

Items can be deleted as with any other control by using GUICtrlDelete."

this shall mean, that the maximum control limitation per gui (4096) shall limit the the ListViewItems as well, as they are treated like normal controls.

i think this is the correct answer to this problem.

for me, it is not the first time i encounter problems regarding the gui-control limitation, and i hope it is possible to be raised in future versions. 4096 controls per gui seems a little too strict. Please change that !!!

regards j.

Edited by jennico2

My contributions:Universal translator with national keyboards and Unicode support.Unicode editor with national keyboards and editing features.

Share this post


Link to post
Share on other sites

this shall mean, that the maximum control limitation per gui (4096) shall limit the the ListViewItems as well, as they are treated like normal controls.

i think this is the correct answer to this problem.

for me, it is not the first time i encounter problems regarding the gui-control limitation, and i hope it is possible to be raised in future versions. 4096 controls per gui seems a little too strict. Please change that !!!

regards j.

You can make workaround by using ListView UDF (it uses native WIN32 ListView API instead of AutoIt's functions) so there are no AutoIt limits

Share this post


Link to post
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
Sign in to follow this  
Followers 0