pixelsearch Posted February 14 Posted February 14 Hi everybody If we look at the help file example, topic _GUICtrlListView_SetGroupInfo , its 4th parameter is described like this : $iAlign [optional] Alignment of the header text for the group: 0 - Left 1 - Center 2 - Right This should be the correct display : Here is the line in the script : _GUICtrlListView_SetGroupInfo($idListview, 1, "New Group 1") or _GUICtrlListView_SetGroupInfo($idListview, 1, "New Group 1", 0) ; same (0 = left) Now if you change this line to : _GUICtrlListView_SetGroupInfo($idListview, 1, "New Group 1", 1) ; (1 = center) Then to : _GUICtrlListView_SetGroupInfo($idListview, 1, "New Group 1", 2) ; (2 = right) Do you have the correct alignment in the 3 cases, as in the pic above ? Or do the 3 displays are all on the left side ? Thanks for testing "I think you are searching a bug where there is no bug..."
argumentum Posted February 15 Posted February 15 (edited) 15 hours ago, pixelsearch said: Do you have the correct alignment in the 3 cases, as in the pic above ? Yes. Win11. expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $hGui = GUICreate("ListView Get/Set Group Info (v" & @AutoItVersion & ")", 400, 300) WinSetOnTop($hGui, "", 1) Local $idListview = GUICtrlCreateListView("", 2, 2, 394, 268) GUISetState(@SW_SHOW) ; Set ANSI format ;~ _GUICtrlListView_SetUnicodeFormat($idListview, False) ; Load images Local $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x0000FF, 16, 16)) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Column 0", 100) _GUICtrlListView_AddColumn($idListview, "Column 1", 100) _GUICtrlListView_AddColumn($idListview, "Column 2", 100) ; Add items _GUICtrlListView_AddItem($idListview, "Row 0: Col 0", 0) _GUICtrlListView_AddSubItem($idListview, 0, "Row 0: Col 1", 1) _GUICtrlListView_AddSubItem($idListview, 0, "Row 0: Col 2", 2) _GUICtrlListView_AddItem($idListview, "Row 1: Col 0", 1) _GUICtrlListView_AddSubItem($idListview, 1, "Row 1: Col 1", 1) _GUICtrlListView_AddItem($idListview, "Row 2: Col 0", 2) ; Build groups _GUICtrlListView_EnableGroupView($idListview) _GUICtrlListView_InsertGroup($idListview, -1, 1, "Group 1", 1) _GUICtrlListView_InsertGroup($idListview, -1, 2, "Group 2") _GUICtrlListView_SetItemGroupID($idListview, 0, 1) _GUICtrlListView_SetItemGroupID($idListview, 1, 2) _GUICtrlListView_SetItemGroupID($idListview, 2, 2) ; Change group information Local $aInfo = _GUICtrlListView_GetGroupInfo($idListview, 1) ;~ MsgBox($MB_SYSTEMMODAL, "Information", "Group 1 Text: " & $aInfo[0]) ;~ _GUICtrlListView_SetGroupInfo($idListview, 1, "New Group 1") ;~ _GUICtrlListView_SetGroupInfo($idListview, 1, "New Group 1", 0) ; left ;~ _GUICtrlListView_SetGroupInfo($idListview, 1, "New Group 1", 1) ; center _GUICtrlListView_SetGroupInfo($idListview, 1, "New Group 1", 2) ; right ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Edited February 15 by argumentum pixelsearch 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
pixelsearch Posted February 15 Author Posted February 15 @argumentum thanks for the test argumentum 1 "I think you are searching a bug where there is no bug..."
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