Jump to content

ListView- Works Different in Beta and Release


Recommended Posts

I'm trying to get more comfortable in using the ListView Control. But there seems to be a lot of differences between the Release and Beta. I would like to be able to just get used to using the Beta version.

In the following I am trying to be able to click on the column header titles and get an event.

I can do this in the release version:

#include <GuiListView.au3>
$Form1 = GUICreate("Remote Desktop", 552, 587, -936, 133)
$listview1 = GUICtrlCreateListView ("col1  |col2|col3  ",10,10,200,150)

GuiSetState ()
While 1
  $msg = GUIGetMsg()
  Select
     Case $msg = $GUI_EVENT_CLOSE
        ExitLoop  
     Case $msg = $ListView1
        MsgBox(0,"Test","Success")
  EndSelect
Wend

But if I use the Beta version, I don't get an event. <_<How can I make this work?

#include <GuiListView.au3>
$Form1 = GUICreate("Remote Desktop", 552, 587, -936, 133)
$ListView1 = _GUICtrlListView_Create ($Form1,"col1  |col2|col3  ", 10,10,200,150 )

GuiSetState ()
While 1
  $msg = GUIGetMsg()
  Select
     Case $msg = $GUI_EVENT_CLOSE
        ExitLoop  
     Case $msg = $ListView1
        MsgBox(0,"Test","Success")
  EndSelect
Wend

Thanks

Link to comment
Share on other sites

I'm trying to get more comfortable in using the ListView Control. But there seems to be a lot of differences between the Release and Beta. I would like to be able to just get used to using the Beta version.

In the following I am trying to be able to click on the column header titles and get an event.

I can do this in the release version:

#include <GuiListView.au3>
$Form1 = GUICreate("Remote Desktop", 552, 587, -936, 133)
$listview1 = GUICtrlCreateListView ("col1  |col2|col3  ",10,10,200,150)

GuiSetState ()
While 1
  $msg = GUIGetMsg()
  Select
     Case $msg = $GUI_EVENT_CLOSE
        ExitLoop  
     Case $msg = $ListView1
        MsgBox(0,"Test","Success")
  EndSelect
Wend

But if I use the Beta version, I don't get an event. <_<How can I make this work?

#include <GuiListView.au3>
$Form1 = GUICreate("Remote Desktop", 552, 587, -936, 133)
$ListView1 = _GUICtrlListView_Create ($Form1,"col1  |col2|col3  ", 10,10,200,150 )

GuiSetState ()
While 1
  $msg = GUIGetMsg()
  Select
     Case $msg = $GUI_EVENT_CLOSE
        ExitLoop  
     Case $msg = $ListView1
        MsgBox(0,"Test","Success")
  EndSelect
Wend

Thanks

The internal "AutoIt" created ListView works the same on both Release and Beta, in the 1st example your using the "Internal" created ListView, in the 2nd your using the UDF created ListView, therefore the msg isn't caught internally by AutoIt. Edited by GaryFrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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