Sign in to follow this  
Followers 0
xcal

ListView and $LVS_NOSORTHEADER

3 posts in this topic

Sample -

#include <GUIConstants.au3>

GUICreate("listview items",220,250, 100,200,-1)

$listview = GUICtrlCreateListView ("col1|col2|col3  ",10,10,200,150, $LVS_NOSORTHEADER)
$item1=GUICtrlCreateListViewItem("item2|col22|col23",$listview)
$item2=GUICtrlCreateListViewItem("item1|col12|col13",$listview)
$item3=GUICtrlCreateListViewItem("item3|col32|col33",$listview)

GUISetState()

Do
  $msg = GUIGetMsg ()
Until $msg = $GUI_EVENT_CLOSE

I was hoping to have a listview that is able to be sorted by clicking a header, and be able to select multiple rows, if need be.

If $LVS_NOSORTHEADER is set I can select multiple rows, but (of course) I can't use the headers for sorting.

If $LVS_NOSORTHEADER is not set I can sort rows using the headers, but I can't select multiple rows.

Is there a way to do both?

Share this post


Link to post
Share on other sites



Sample -

#include <GUIConstants.au3>

GUICreate("listview items",220,250, 100,200,-1)

$listview = GUICtrlCreateListView ("col1|col2|col3  ",10,10,200,150, $LVS_NOSORTHEADER)
$item1=GUICtrlCreateListViewItem("item2|col22|col23",$listview)
$item2=GUICtrlCreateListViewItem("item1|col12|col13",$listview)
$item3=GUICtrlCreateListViewItem("item3|col32|col33",$listview)

GUISetState()

Do
  $msg = GUIGetMsg ()
Until $msg = $GUI_EVENT_CLOSE
oÝ÷ ز)x-¢¯y©b²Ûâ{ajجi¹^¶Þ²íyÖòrX)àjuêÚÖÞi¹^¶ç-ém^®,ùÞyÖÞ!ý7èµR4äE1Ä1Ë´Ç¥yËfº[b¦W«£ºÚr«±âj}ý¶ë¶¡y§^®Çè®Ê+)à!ý7èµR4äE1Ä1Æç¢ßÛ±ëHq©ì¢»k£.²)ඡy§^®Æî´m±é^rٮةêèÂÂ,¶«y¬ÊÚ¡º-ú®¢×ç^}«¥¶+,x%zÇ¥yËZÛ!£¥Á¬¬ë-±ëmë!£¥Á¬¬~V jëh×6
#include <GUIConstants.au3>

GUICreate("listview items",220,250, 100,200,-1)

$listview = GUICtrlCreateListView ("col1|col2|col3  ",10,10,200,150, $LVS_SHOWSELALWAYS)
$item1=GUICtrlCreateListViewItem("item2|col22|col23",$listview)
$item2=GUICtrlCreateListViewItem("item1|col12|col13",$listview)
$item3=GUICtrlCreateListViewItem("item3|col32|col33",$listview)

GUISetState()

Do
  $msg = GUIGetMsg ()
Until $msg = $GUI_EVENT_CLOSE

SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

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