dbkaynor Posted April 18, 2008 Share Posted April 18, 2008 When I create a list view with _GUICtrlListView_Create the control will not resize when the parent window is resized. Is there a way to enable this? I has tried a bunch of different options with no success. Link to comment Share on other sites More sharing options...
Zedna Posted April 18, 2008 Share Posted April 18, 2008 #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> $GUI = GUICreate("ListView SIZE example", 400, 300, -1, -1, BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX)) $hListView = _GUICtrlListView_Create ($GUI, "", 2, 2, 396, 296, $LVS_REPORT, $WS_EX_CLIENTEDGE ) _GUICtrlListView_SetExtendedListViewStyle ($hListView, $LVS_EX_FULLROWSELECT) GUISetState() GUIRegisterMsg($WM_SIZE, "MY_WM_SIZE") _GUICtrlListView_InsertColumn ($hListView, 0, "Column 1", 100) _GUICtrlListView_InsertColumn ($hListView, 1, "Column 2", 100) _GUICtrlListView_InsertColumn ($hListView, 2, "Column 3", 100) _GUICtrlListView_AddItem ($hListView, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem ($hListView, 0, "Row 1: Col 2", 1) _GUICtrlListView_AddSubItem ($hListView, 0, "Row 1: Col 3", 2) _GUICtrlListView_AddItem ($hListView, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem ($hListView, 1, "Row 2: Col 2", 1) _GUICtrlListView_AddItem ($hListView, "Row 3: Col 1", 2) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Func MY_WM_SIZE() $size = WinGetClientSize($GUI) ControlMove($GUI, '', $hListView, 2, 2, $size[0] - 4, $size[1] - 4) Return $GUI_RUNDEFMSG EndFunc Resources UDF ResourcesEx UDF AutoIt Forum Search 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