playjacob Posted September 26, 2012 Posted September 26, 2012 (edited) Hello i hope someone can help me with my problem.What i'm trying to do is having a listview with both icons and text but this is what i get:Where i would really like to get this: (Image edited with gimp)I'm sure it's just a style i have to apply to get it working but i couldn't find it.Here's my code for the first picture:#include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> _Main() Func _Main() Local $hImage, $aSize, $listview GUICreate("ImageList Set Icon Size", 400, 300) $listview = GUICtrlCreateListView("", 2, 2, 394, 296, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER, $LVS_REPORT, $LVS_NOCOLUMNHEADER)) GUISetState() $hImage = _GUIImageList_Create(64, 64, 5, 4, 3) _GUIImageList_AddIcon($hImage, @SystemDir & "shell32.dll", 110, True) _GUIImageList_AddIcon($hImage, @SystemDir & "shell32.dll", 131, True) _GUIImageList_AddIcon($hImage, @SystemDir & "shell32.dll", 165, True) _GUICtrlListView_SetImageList($listview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($listview, "", 120) ; Add items _GUICtrlListView_AddItem($listview, "Icon 1", 0) _GUICtrlListView_AddItem($listview, "Icon 2", 1) _GUICtrlListView_AddItem($listview, "Icon 3", 2) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_MainHalf of the code is from the helpfile.Sorry for any bad English there may be I'm from Denmark and only 13 years old. :-)EDIT: Fixed Pictures Edited September 26, 2012 by playjacob
FireFox Posted September 26, 2012 Posted September 26, 2012 Hi, The only function I know to change the display style of a listview is _GUICtrlListView_SetView but It does not do what you want. Maybe you have to edit some styles of your listview. Br, FireFox.
playjacob Posted September 27, 2012 Author Posted September 27, 2012 Hi,The only function I know to change the display style of a listview is _GUICtrlListView_SetView but It does not do what you want. Maybe you have to edit some styles of your listview.Br, FireFox.I think that editing some styles would be the way to go, but witch?Is there any where that you can see all the style that you can use on a listview?
guinness Posted September 27, 2012 Posted September 27, 2012 What about this >> UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
playjacob Posted September 27, 2012 Author Posted September 27, 2012 What about this >> That might be what i want but i can't seem to get images to work when you use "_GUICtrlListView_SetView($hListView, 4)" to set the listview to tile mode.
guinness Posted September 27, 2012 Posted September 27, 2012 I haven't had much success either, but then I haven't done much research on it. Sorry. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
AdmiralAlkex Posted September 27, 2012 Posted September 27, 2012 Tiles have the text to the right, I thought that wasn't what you wanted? Images are fine, but you must change _GUICtrlListView_SetImageList() to 0 (large images). Large icons (SetView 1) is more like your picture but horizontal. _GUICtrlListView_SetView($listview, 1) _GUICtrlListView_SetImageList($listview, $hImage, 0) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
guinness Posted September 27, 2012 Posted September 27, 2012 Tiles have the text to the right, I thought that wasn't what you wanted? Images are fine, but you must change _GUICtrlListView_SetImageList() to 0 (large images). Large icons (SetView 1) is more like your picture but horizontal. _GUICtrlListView_SetView($listview, 1) _GUICtrlListView_SetImageList($listview, $hImage, 0)Ah, large icons! UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
AdmiralAlkex Posted September 27, 2012 Posted September 27, 2012 Ah, large icons!I've never learned which size goes where, I just try them all. Luckily there is only three! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
guinness Posted September 27, 2012 Posted September 27, 2012 I've never learned which size goes where, I just try them all. Luckily there is only three! The old trial and error method! UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
FireFox Posted September 27, 2012 Posted September 27, 2012 Tiles have the text to the right, I thought that wasn't what you wanted? Images are fine, but you must change _GUICtrlListView_SetImageList() to 0 (large images). Large icons (SetView 1) is more like your picture but horizontal. _GUICtrlListView_SetView($listview, 1) _GUICtrlListView_SetImageList($listview, $hImage, 0) Damn... I though he already tried it.
KaFu Posted September 27, 2012 Posted September 27, 2012 (edited) expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> _Main() Func _Main() Local $hImage, $aSize, $listview $hGUI = GUICreate("LV", 400, 300) $listview = GUICtrlCreateListView("", 2, 2, 394, 296, BitOR($LVS_ICON, $LVS_ALIGNLEFT)) _GUICtrlListView_SetView($listview, 1) ; _GUICtrlListView_SetExtendedListViewStyle($listview, $LVS_EX_HIDELABELS) ; nice one too :)... $hImage_Large = _GUIImageList_Create(32, 32, 5, 4, 3) _GUIImageList_AddIcon($hImage_Large, @SystemDir & "shell32.dll", 110, True) _GUIImageList_AddIcon($hImage_Large, @SystemDir & "shell32.dll", 131, True) _GUIImageList_AddIcon($hImage_Large, @SystemDir & "shell32.dll", 165, True) _GUICtrlListView_SetImageList($listview, $hImage_Large, 0) ; Add columns _GUICtrlListView_AddColumn($listview, "", 120) ; Add items _GUICtrlListView_AddItem($listview, "Icon 1", 0) _GUICtrlListView_AddItem($listview, "Icon 2", 1) _GUICtrlListView_AddItem($listview, "Icon 3", 2) GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GUIImageList_Destroy($hImage_Large) GUIDelete() EndFunc ;==>_Main Edit: Additionally you can fine-tune the layout with _GUICtrlListView_SetIconSpacing(). expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> _Main2() Func _Main2() Local $hImage, $aSize, $listview $hGUI = GUICreate("LV", 400, 300) $listview = GUICtrlCreateListView("", 2, 2, 394, 296, BitOR($LVS_ICON, $LVS_ALIGNLEFT)) _GUICtrlListView_SetView($listview, 1) ;_GUICtrlListView_SetExtendedListViewStyle($listview, $LVS_EX_HIDELABELS) ; nice one too :)... $hImage_Large = _GUIImageList_Create(32, 32, 5, 4, 3) _GUIImageList_AddIcon($hImage_Large, @SystemDir & "shell32.dll", 110, True) _GUIImageList_AddIcon($hImage_Large, @SystemDir & "shell32.dll", 131, True) _GUIImageList_AddIcon($hImage_Large, @SystemDir & "shell32.dll", 165, True) _GUICtrlListView_SetImageList($listview, $hImage_Large, 0) _GUICtrlListView_SetIconSpacing($listview, 32 + 6, 26) ; Add columns _GUICtrlListView_AddColumn($listview, "", 120) ; Add items For $y = 1 To 7 For $i = 0 To 2 _GUICtrlListView_AddItem($listview, "Icon " & $y * ($i + 1), $i) Next Next GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GUIImageList_Destroy($hImage_Large) GUIDelete() EndFunc ;==>_Main2 Edited September 27, 2012 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
AdmiralAlkex Posted September 27, 2012 Posted September 27, 2012 (edited) So $LVS_ALIGNLEFT is how you do it. Nice one. I see it's in the helpfile for _GUICtrlListView_Create() but not GUICtrlCreateListView(), I don't like it when they do like that. Edited September 27, 2012 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
playjacob Posted September 28, 2012 Author Posted September 28, 2012 (edited) Edit:Additionally you can fine-tune the layout with _GUICtrlListView_SetIconSpacing().Thanks! That's just what i wanted. EDIT: I'm now having another problem the listview make several row horizontally and i only want it to be a one vertical line of icons in a listview.I've messed around with the _GUICtrlListView_SetIconSpacing but that didn't seam to do the trick. Any way to do that? Edited September 28, 2012 by playjacob
KaFu Posted September 28, 2012 Posted September 28, 2012 I'm not sure if this is the proper way , but if not it's at least a work-around. You can define a tight workarea to prevent a "column break" with _GUICtrlListView_SetWorkAreas(). #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> _Main2() Func _Main2() Local $hImage, $aSize, $hListview $hGUI = GUICreate("LV", 400, 300) $cListview = GUICtrlCreateListView("", 2, 2, 394, 296, BitOR($LVS_ICON, $LVS_ALIGNLEFT)) $hListview = GUICtrlGetHandle($cListview) _GUICtrlListView_SetView($hListview, 1) ;_GUICtrlListView_SetExtendedListViewStyle($hListview, $LVS_EX_HIDELABELS) ; nice one too :)... $hImage_Large = _GUIImageList_Create(32, 32, 5, 4, 3) _GUIImageList_AddIcon($hImage_Large, @SystemDir & "shell32.dll", 110, True) _GUIImageList_AddIcon($hImage_Large, @SystemDir & "shell32.dll", 131, True) _GUIImageList_AddIcon($hImage_Large, @SystemDir & "shell32.dll", 165, True) _GUICtrlListView_SetImageList($hListview, $hImage_Large, 0) _GUICtrlListView_SetIconSpacing($hListview, 32 + 6, 26) ; Add columns _GUICtrlListView_AddColumn($hListview, "", 120) ; Add items For $y = 1 To 21 _GUICtrlListView_AddItem($hListview, "Icon " & $y, 1) Next _GUICtrlListView_SetWorkAreas($hListview, 0, 0, 32, $y * 3 * 32) GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GUIImageList_Destroy($hImage_Large) GUIDelete() EndFunc ;==>_Main2 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
playjacob Posted September 28, 2012 Author Posted September 28, 2012 I'm not sure if this is the proper way , but if not it's at least a work-around. You can define a tight workarea to prevent a "column break" with _GUICtrlListView_SetWorkAreas().Thanks that seams to work as i wont it to.Thanks to all that helped!
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