phonk Posted December 1, 2010 Share Posted December 1, 2010 Hello, is it possible to put the checkboxes in a listview on the right side ? Greets Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 1, 2010 Moderators Share Posted December 1, 2010 phonk,Best I can do is reversing the whole ListView: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiListView.au3> Opt('MustDeclareVars', 1) Example() Func Example() GUICreate("Reversed Listview", 220, 250) Local $hListView = GUICtrlCreateListView("col1 |col2|col3", 10, 10, 200, 150, -1, $WS_EX_LAYOUTRTL) ; Reverse the GUI _GUICtrlListView_SetExtendedListViewStyle(GUICtrlGetHandle($hListView), $LVS_EX_CHECKBOXES) GUICtrlCreateListViewItem("item2|col22|col23", $hListView) GUICtrlCreateListViewItem("item1|col12|col13", $hListView) GUICtrlCreateListViewItem("item3|col32|col33", $hListView) GUISetState() While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd EndFunc ;==>ExampleAny use? M23P.S. Got the Local in there for you this time. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
phonk Posted December 1, 2010 Author Share Posted December 1, 2010 phonk, Best I can do is reversing the whole ListView: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiListView.au3> Opt('MustDeclareVars', 1) Example() Func Example() GUICreate("Reversed Listview", 220, 250) Local $hListView = GUICtrlCreateListView("col1 |col2|col3", 10, 10, 200, 150, -1, $WS_EX_LAYOUTRTL) ; Reverse the GUI _GUICtrlListView_SetExtendedListViewStyle(GUICtrlGetHandle($hListView), $LVS_EX_CHECKBOXES) GUICtrlCreateListViewItem("item2|col22|col23", $hListView) GUICtrlCreateListViewItem("item1|col12|col13", $hListView) GUICtrlCreateListViewItem("item3|col32|col33", $hListView) GUISetState() While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd EndFunc ;==>Example Any use? M23 P.S. Got the Local in there for you this time. Thanks for the Local ;-) That would be an option, thanks. Is there a chance to get the colums left aligned, when the Listview is reversed ? Link to comment Share on other sites More sharing options...
phonk Posted December 2, 2010 Author Share Posted December 2, 2010 Is there an option ? Link to comment Share on other sites More sharing options...
MDCT Posted November 20, 2011 Share Posted November 20, 2011 I happened to find another solution for this. Just thought to share with the community. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiListView.au3> Opt('MustDeclareVars', 1) Example() Func Example() GUICreate("Reversed Listview", 220, 250) Local $hListView = GUICtrlCreateListView("|col1|col2|col3", 10, 10, 200, 150, -1) ; I put blank for the checkbox-header's text _GUICtrlListView_SetExtendedListViewStyle(GUICtrlGetHandle($hListView), BitOR($LVS_EX_GRIDLINES,$LVS_EX_CHECKBOXES)) _GUICtrlListView_SetColumnOrder($hListView, "1|2|3|0");Set the order so the checkbox column is on the right side GUICtrlCreateListViewItem("|1|col22|col23", $hListView) GUICtrlCreateListViewItem("|2|col12|col13", $hListView) GUICtrlCreateListViewItem("|3|col32|col33", $hListView) GUISetState() While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd EndFunc ;==>Example idbirch 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now