EKY32 Posted August 18, 2012 Share Posted August 18, 2012 (edited) Is it possible to resize the GuiCtrlCreateListView column's width when resizing a window? as the list view has GUICtrlSetResizing(-1, $GUI_DOCKALL) and GUICtrlSetResizing(-1, $GUI_DOCKBORDERS). Thank you. Edited August 18, 2012 by EKY32 [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font] Link to comment Share on other sites More sharing options...
JScript Posted August 18, 2012 Share Posted August 18, 2012 (edited) Try this: expandcollapse popup#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> $Debug_LV = False ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work Global $hForm, $hListView _Main() Func _Main() $hForm = GUICreate("ListView Set Column Width", 400, 300, -1, -1, $WS_OVERLAPPEDWINDOW) $hListView = GUICtrlCreateListView("Column 1|Column 2|Column 3|Column 4", 2, 2, 394, 268) GUIRegisterMsg($WM_SIZING, "_RegisterMsg") GUIRegisterMsg($WM_SIZE, "_RegisterMsg") GUISetState() ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main Func _RegisterMsg($hWnd, $Msg, $WParam, $LParam) Local $iColCount, $aGetSize, $iWidth $iColCount = _GUICtrlListView_GetColumnCount($hListView) $aGetSize = WinGetClientSize($hWnd) $iWidth = Int($aGetSize[0] / $iColCount) For $i = 0 To $iColCount _GUICtrlListView_SetColumnWidth($hListView, $i, $iWidth) Next EndFunc Regards, João Carlos. Edited August 18, 2012 by JScript EKY32 1 http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
EKY32 Posted August 18, 2012 Author Share Posted August 18, 2012 Thank toy very much Mr. JScript [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font] 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