Jump to content

ListView header problem...


mikkokh
 Share

Recommended Posts

Hi.

What is wrong about this script?

- Should "GUICtrlSetData" even work on this job, or have I misunderstand guide of Help file? Have I missed something?

#include <GuiConstants.au3>

$window = GuiCreate("Test Win", 150, 200, -1, -1)

$listView = GuiCtrlCreateListView("", 10, 10, 130, 180, -1, $LVS_EX_FULLROWSELECT + $LVS_EX_GRIDLINES)
GUICtrlSetData($listView, "test")

GuiSetState(@SW_SHOW, $window)

While Not (GUIGetMsg() =  $GUI_EVENT_CLOSE)
   ;;;
WEnd

Thanks for help!

- miXza-81 -

Link to comment
Share on other sites

#include <GuiConstantsEx.au3>
#include <ListViewConstants.au3>
#include <GuiListView.au3>

$window = GuiCreate("Test Win", 150, 200, -1, -1)

$listView = GuiCtrlCreateListView("", 10, 10, 130, 180, -1, $LVS_EX_FULLROWSELECT + $LVS_EX_GRIDLINES)
_GUICtrlListView_AddColumn($listView, "Column")
_GUICtrlListView_AddColumn($listView, "New Column 2", 100)
;~ GUICtrlSetData($listView, "test") ; un-comment this and it will change the header column 1 or index 0

GuiSetState(@SW_SHOW, $window)

While Not (GUIGetMsg() =  $GUI_EVENT_CLOSE)
   ;;;
WEnd

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

#include <GuiConstantsEx.au3>
#include <ListViewConstants.au3>
#include <GuiListView.au3>

$window = GuiCreate("Test Win", 150, 200, -1, -1)

$listView = GuiCtrlCreateListView("", 10, 10, 130, 180, -1, $LVS_EX_FULLROWSELECT + $LVS_EX_GRIDLINES)
_GUICtrlListView_AddColumn($listView, "Column")
_GUICtrlListView_AddColumn($listView, "New Column 2", 100)
;~ GUICtrlSetData($listView, "test") ; un-comment this and it will change the header column 1 or index 0

GuiSetState(@SW_SHOW, $window)

While Not (GUIGetMsg() =  $GUI_EVENT_CLOSE)
   ;;;
WEnd
Thank you. :)

- Now I understand what "GUICtrlSetData" relly do for ListView...

So, there is not simplier way to make several Columns at same time after "GuiCtrlCreateListView" function?

Perhaps I should do that job with combination of Array, loop and that "_GUICtrlListView_AddColumn" function...

- miXza-81 -

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