Jump to content

Listbox vs ListView


nlgoh
 Share

Recommended Posts

Hi all,

Need some help here with Listbox. I wrote a script using that using Listbox and tested on my laptop. Everything is working as expected. However, when I ran the same script on the other PC, the main window didn't come out, although there is an icon indicated that the script is running. After spending some time debugging, I found out that if I were to change listbox to listview, the main window will displayed as expected. Both my laptop and PC are running WIn7 service pack 1.... Any ideas what's wrong with my PC? Do I need to get some plug-in for listbox to work?

Thanks.

Link to comment
Share on other sites

Actually, I can just use a simple GUI script to duplicate the problem.

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 613, 431, 192, 132)
$Input1 = GUICtrlCreateInput("Input1", 264, 48, 209, 24)
$Edit1 = GUICtrlCreateEdit("", 256, 96, 217, 225)
GUICtrlSetData(-1, "Edit1")
$List1 = GUICtrlCreateList("", 40, 40, 185, 262)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

With the above script, no window when executed on my PC. By replacing "$List1 = GUICtrlCreateList("", 40, 40, 185, 262)" to "$List1 = GUICtrlCreateListView("", 40, 40, 185, 262)", everything works.

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