Jump to content
Sign in to follow this  
E1M1

Need help with checkboxes on listview

Recommended Posts

E1M1

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

Share this post


Link to post
Share on other sites
E1M1

nope. I want that checkbox to be in last column. Edit I think it's GirdView I need, but how to ise it with autoit?

Edited by E1M1

edited

Share this post


Link to post
Share on other sites
pyzonet

#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


Example Script(s): Export Listview to Excel & Print!....(¯`v´¯)..... ·.¸.·´...¸.·´.. (☻//▌♥♥/ \ ... Wake up the dawn and ask her why ...╔══╗ ♥ ♫ ♥║██║ ♫ ♥ ♫║(O)║♥A dreamer dreams she never dies♥╚══╝۩۞۩ஜ1984'09ஜ۩۞۩

Share this post


Link to post
Share on other sites
E1M1

That's good trick actually. Does anyone know anything about datagridview?


edited

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.