Jump to content

Guicreatelistviewitem. Max lines?


 Share

Recommended Posts

Is there a limit to how many list view items are created or how many can be created in a certain space?

#include <GuiConstants.au3>
#include <file.au3>

$file="display.tmp"
DIM $LISTITEM
$LINE=0

; GUI
GuiCreate("Phone Reports",750,500)

; LIST VIEW

$listView = GuiCtrlCreateListView("Num|Name|DEPT|Extension|Date|Time Called|Duration|Type|Dialed",170,100,570,370)

REFRESH()

FUNC REFRESH()
SplashTextOn("Please wait...",@CRLF & "Downloading Phone Data", 200,50,-1,-1,0,"Ravi",10)
InetGet("http://someurl/reports/display.php?cmd=display",$file,1,0)
ControlSetText("Please wait...", "", "Static1", @CRLF & "Updating Phone Data")

_FILEREADTOARRAY($file,$line)

For $x=1 to $line[0]   
    $listitem = GuiCtrlCreateListViewItem($x & "|" & $line[$x],$listview)
Next


SplashOff()
ENDFUNC


; GUI MESSAGE LOOP

GUISetState ()
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
;   REFRESH()
WEnd
GUIDelete()
FILEDELETE($file)
$LISTITEM=0
Exit

I've thrown in a variable in the readtoarray and it reads the whole text file but only 4076 listviewitems are bieng created? also if I change the window size to be larger I can see more listviewitems its almost as if the toolbar can only go so small? Anyone got any idea's suggestions?

Link to comment
Share on other sites

Is there a limit to how many list view items are created or how many can be created in a certain space?

#include <GuiConstants.au3>
#include <file.au3>

$file="display.tmp"
DIM $LISTITEM
$LINE=0

; GUI
GuiCreate("Phone Reports",750,500)

; LIST VIEW

$listView = GuiCtrlCreateListView("Num|Name|DEPT|Extension|Date|Time Called|Duration|Type|Dialed",170,100,570,370)

REFRESH()

FUNC REFRESH()
SplashTextOn("Please wait...",@CRLF & "Downloading Phone Data", 200,50,-1,-1,0,"Ravi",10)
InetGet("http://someurl/reports/display.php?cmd=display",$file,1,0)
ControlSetText("Please wait...", "", "Static1", @CRLF & "Updating Phone Data")

_FILEREADTOARRAY($file,$line)

For $x=1 to $line[0]   
    $listitem = GuiCtrlCreateListViewItem($x & "|" & $line[$x],$listview)
Next
SplashOff()
ENDFUNC
; GUI MESSAGE LOOP

GUISetState ()
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
;    REFRESH()
WEnd
GUIDelete()
FILEDELETE($file)
$LISTITEM=0
Exit

I've thrown in a variable in the readtoarray and it reads the whole text file but only 4076 listviewitems are bieng created? also if I change the window size to be larger I can see more listviewitems its almost as if the toolbar can only go so small?  Anyone got any idea's suggestions?

<{POST_SNAPBACK}>

There is a limit as each ListViewItem is a control and the total number of controls is 4096
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...