Sign in to follow this  
Followers 0
playjacob

Listview icon and text

16 posts in this topic

#1 ·  Posted (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:

Posted Image

Where i would really like to get this: (Image edited with gimp)

Posted Image

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 ;==>_Main

Half 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 by playjacob

Share this post


Link to post
Share on other sites



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.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

What about this >>


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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 parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

I haven't had much success either, but then I haven't done much research on it. Sorry.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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 parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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!

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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 parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

I've never learned which size goes where, I just try them all. Luckily there is only three! :idiot::D

The old trial and error method!

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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 parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

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.

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

#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().

#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 by KaFu

Share this post


Link to post
Share on other sites

#13 ·  Posted (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 by AdmiralAlkex

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Edit:

Additionally you can fine-tune the layout with _GUICtrlListView_SetIconSpacing().

Thanks! That's just what i wanted. :ILA2:

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 by playjacob

Share this post


Link to post
Share on other sites

I'm not sure if this is the proper way :lol:, 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

Share this post


Link to post
Share on other sites

I'm not sure if this is the proper way :lol:, 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!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0