Jump to content

Need help with checkboxes on listview


E1M1
 Share

Recommended Posts

I have listview with Code|Name|Member of EU. How do I move that checkbox from code column to Member of EU column with out using $WS_EX_LAYOUTRTL?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("countries", 339, 328, 191, 237)
$ListView1 = GUICtrlCreateListView("Code|Name|Member of EU", 0, 40, 338, 286)
_GUICtrlListView_SetExtendedListViewStyle(GUICtrlGetHandle($ListView1), $LVS_EX_CHECKBOXES)
$item1 = GUICtrlCreateListViewItem("|EE|Estonia", $ListView1)
$item2 = GUICtrlCreateListViewItem("|LV|Latvia", $ListView1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd

edited

Link to comment
Share on other sites

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("countries", 339, 328, 191, 237)
$listview = GUICtrlCreateListView("Code|Name",0,40,120,286)
_GUICtrlListView_SetExtendedListViewStyle($ListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT))
$item = GUICtrlCreateListViewItem("|EE", $ListView)
$item = GUICtrlCreateListViewItem("|LV", $ListView)
$ListView1 = GUICtrlCreateListView("Member of EU", 110, 40, 228, 286)
_GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES))
$item1 = GUICtrlCreateListViewItem("Estonia", $ListView1)
$item2 = GUICtrlCreateListViewItem("Latvia", $ListView1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd

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