Modify

#4097 closed Bug (Fixed)

GuiListView Extended Styles Documentation

Reported by: MattyD Owned by: Jpm
Milestone: 3.3.19.0 Component: Documentation
Version: 3.3.18.0 Severity: None
Keywords: Cc:

Description

Hey jpm

The _GUICtrlListView_Create documentation suggests you can use the LV_EX constants as extended window styles, but they're a different thing. The constants can only be used with _GUICtrlListView_SetExtendedListViewStyle as demonstrated below.

#include <GuiListView.au3>
#include <GuiConstants.au3>

Global $hGUI = GUICreate("Test", 400, 200)
Global $hLV = _GUICtrlListView_Create($hGUI, "Col A", 10, 10, 380, 180)
_GUICtrlListView_SetExtendedListViewStyle($hLV, $LVS_EX_CHECKBOXES)
For $i = 1 To 10
    _GUICtrlListView_AddItem($hLV, "item " & $i)
Next

ConsoleWrite("LV ExStyle: " & _GUICtrlListView_GetExtendedListViewStyle($hLV) & @CRLF)
ConsoleWrite("Window ExStyle: " & _WinAPI_GetWindowLong($hLV, $GWL_EXSTYLE) & @CRLF)

GUISetState()

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

GUIDelete()

Also, in the _GUICtrlListView_SetExtendedListViewStyle documentation we could probably add the following:

$LVS_EX_AUTOAUTOARRANGE - Automatically arrange icons if no icon positions have been set. (Windows Vista and later)
$LVS_EX_AUTOSIZECOLUMNS - Automatically size listview columns. (Windows Vista and later)
$LVS_EX_COLUMNOVERFLOW - Indicates that an overflow button should be displayed in icon/tile view if necessary.  Requires LVS_EX_HEADERINALLVIEWS to be also specified. 
$LVS_EX_COLUMNSNAPPOINTS - Snap to minimum column width when the user resizes a column. (Windows Vista and later)
$LVS_EX_HEADERINALLVIEWS - Show column headers in all view modes. (Windows Vista and later) 
$LVS_EX_HIDELABELS - Hides the labels in icon and small icon view.
$LVS_EX_JUSTIFYCOLUMNS - Icons are lined up in columns that use up the whole view. (Windows Vista and later)
$LVS_EX_SNAPTOGRID - In icon view, icons automatically snap into a grid.
$LVS_EX_TRANSPARENTBKGND - Background is painted by the parent via WM_PRINTCLIENT. (Windows Vista and later)
$LVS_EX_TRANSPARENTSHADOWTEXT - Enable shadow text on transparent backgrounds only. (Windows Vista and later)

And maybe remove this one? (Do we still support < v6.0?)

$LVS_EX_REGIONAL - Sets the control region to include only the item icons and text 
-- Version 4.71 through Version 5.80 only. Not supported on Windows Vista and later. --

I'd also suggest updating the LVS Extended style table in the appendix, but it seems you can use some of the LV_EX styles with GUICtrlCreateListView. So adding extra constants into that table could invalidate the GUICtrlCreateListView documentation. I'm guessing there's some internal filtering going on in that func, and there's a risk of LVS_EX values clashing with WS_EX ones!

Cheers,
Matt

Attachments (0)

Change History (1)

comment:1 by Jpm, on Jun 12, 2026 at 4:34:02 PM

Owner: set to Jpm
Resolution: Fixed
Status: newclosed

Fixed by revision [13417] in version: 3.3.19.0

Fixed #4097: GuiListView Extended Styles Documentation.

Modify Ticket

Action
as closed The owner will remain Jpm.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.