TsukasaX Posted March 26, 2012 Share Posted March 26, 2012 (edited) Already searched the forums and couldn't find a solution.This issue is the grid lines are cropping off the left side of my sub item icons. Is there a way I can reposition them further to the right? The difference in space between icon and text between the two columns looks bad as well.Local $hLV = _GUICtrlListView_Create($hGUI, '', 5, 45, 590, 350, -1, $WS_EX_CLIENTEDGE) _GUICtrlListView_SetExtendedListViewStyle($hLV, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_INFOTIP)) _GUICtrlListView_AddColumn($hLV, 'Destination (Link)', 265) _GUICtrlListView_AddColumn($hLV, 'Source', 265) Local $hLVImg = _GUIImageList_Create(16, 16, 5, 1 + 2) _GUIImageList_AddIcon($hLVImg, 'drive.ico') ; default _GUIImageList_AddIcon($hLVImg, 'drive-exclamation.ico') _GUIImageList_AddIcon($hLVImg, 'drive-network.ico') _GUIImageList_AddIcon($hLVImg, 'usb-flash-drive.ico') _GUICtrlListView_SetImageList($hLV, $hLVImg, 1)Example:Edit from post below:This a screenshot of v3.3.9.2 on Windows XP x86. Edited March 27, 2012 by TsukasaX Link to comment Share on other sites More sharing options...
TsukasaX Posted March 27, 2012 Author Share Posted March 27, 2012 _GUICtrlListView_SetIconSpacing() doesn't work in this case because it is not using large icons. Link to comment Share on other sites More sharing options...
BrewManNH Posted March 27, 2012 Share Posted March 27, 2012 What happens if you get rid of the extended listview styles line? Because you're mixing several different styles in there that don't seem to go together. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
guinness Posted March 27, 2012 Share Posted March 27, 2012 I personally haven't noticed this problem on Windows 7 x64. 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 Link to comment Share on other sites More sharing options...
TsukasaX Posted March 27, 2012 Author Share Posted March 27, 2012 Getting rid of $LVS_EX_GRIDLINES makes it look alright (no longer crops the icon) but the inconsistent spacing still looks bad. I'd really like to keep the lines there. Also sorry I forgot this in the original post: This is v3.3.9.2 on Windows XP x86. I have a Windows 7 x64 that I will test later. Link to comment Share on other sites More sharing options...
BrewManNH Posted March 28, 2012 Share Posted March 28, 2012 Have you tried just commenting out the extended listview setting line completely and seeing how it looks? Because as I said, you have competing settings that don't go together I believe. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
TsukasaX Posted March 28, 2012 Author Share Posted March 28, 2012 Have you tried just commenting out the extended listview setting line completely and seeing how it looks? Because as I said, you have competing settings that don't go together I believe.Yes I have:Getting rid of $LVS_EX_GRIDLINES makes it look alright (no longer crops the icon) but the inconsistent spacing still looks bad. I'd really like to keep the lines there.And the result is:But I would still really like all of the extended styles ($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_INFOTIP) in there. Link to comment Share on other sites More sharing options...
BrewManNH Posted March 28, 2012 Share Posted March 28, 2012 Seems that you've changed the script in the first post so that some of the settings that were in there aren't the same any longer. I would add back in the settings one by one until you see which might be causing the issue. Also, is there a reason you're using the UDF created ListView instead of the built-in version? I'm not sure if there's going to be any difference with your issue, but there might be. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
TsukasaX Posted March 28, 2012 Author Share Posted March 28, 2012 (edited) Seems that you've changed the script in the first post so that some of the settings that were in there aren't the same any longer. I would add back in the settings one by one until you see which might be causing the issue. Also, is there a reason you're using the UDF created ListView instead of the built-in version? I'm not sure if there's going to be any difference with your issue, but there might be.I took out $WS_EX_WINDOWEDGE (I think) and added $LVS_EX_INFOTIP, sorry about that. I tend to use UDF controls except for simple ones like buttons/input because of all the functions for customization. I was under the impression that GUICtrlCreateListViewItem() didn't have support for icons.I already know what the problem is, it's that $LVS_EX_GRIDLINES is being drawn after the icons, so the left pixel of the 2nd column's icons gets drawn on top of. As asked in the original post, I'm looking for functions to reposition the icon (or text if that moves the icon as well).Edit: image with sub-item icons and no gridlines to show what I mean. Edited March 28, 2012 by TsukasaX Link to comment Share on other sites More sharing options...
BrewManNH Posted March 28, 2012 Share Posted March 28, 2012 Have you tried adding the $LVS_EX_GRIDLINES in the _GUICtrlListView_Create command instead of adding the style later? I see no reason to use the SetExtended function if all you're doing is setting the extended parameters, because you can do that during creation of the LV. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
TsukasaX Posted March 28, 2012 Author Share Posted March 28, 2012 Have you tried adding the $LVS_EX_GRIDLINES in the _GUICtrlListView_Create command instead of adding the style later? I see no reason to use the SetExtended function if all you're doing is setting the extended parameters, because you can do that during creation of the LV. $hLV = _GUICtrlListView_Create($hGUI, '', 5, 45, 590, 350, -1, BitOR($WS_EX_CLIENTEDGE, $LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_INFOTIP)) Produces: and $hLV = _GUICtrlListView_Create($hGUI, '', 5, 45, 590, 350, -1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_INFOTIP)) Produces: I do not like the edge in either case, and $LVS_EX_GRIDLINES and $LVS_EX_SUBITEMIMAGES do not show up in either case. Link to comment Share on other sites More sharing options...
TsukasaX Posted March 28, 2012 Author Share Posted March 28, 2012 (edited) A _GUICtrlListView_SetItemRectEx() to match _GUICtrlListView_GetItemRectEx() would be perfect for what I want, I could set the box for the icon and label separately. Update: did not find anything in a Google search, and it looks like this functionality doesn't exist within Windows.I don't want to use _GUICtrlListView_SetItemIndent() because it indents too far (increments of 16px because of icon size)._GUICtrlListView_SetItemPosition() might work, but I don't think it affects the space between and icon and text like desired. Update: doesn't seem to work at all for me, and does not have options for subitems.Stated previously: _GUICtrlListView_SetIconSpacing() doesn't work in this case because it is not using large icons. Update: also doesn't work because it doesn't have a subitem parameter.Edit 2:_GUICtrlListView_SetItem() indent doesn't work in my script or even the example script.Edit 1: to reproduce a similar icon/text spacing, run the _GUICtrlListView_AddSubItem() sample.Edit 3: to reproduce a similar icon clipping, run the _GUICtrlListView_SortItems() sample. Edited March 28, 2012 by TsukasaX Link to comment Share on other sites More sharing options...
BrewManNH Posted March 28, 2012 Share Posted March 28, 2012 I've tried it with both the built-in function and the UDF function to create the LV and it's showing the same thing both ways. SetItemIndent doesn't work on subitems by the way, it will only indent the first column. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
TsukasaX Posted March 28, 2012 Author Share Posted March 28, 2012 It seems I will either have to draw my own lines or do without, thank you for your help BrewMan. Link to comment Share on other sites More sharing options...
rover Posted March 29, 2012 Share Posted March 29, 2012 I also see this issue in Win7 x64 as well as XP SP3 x86 Might I suggest an asymmetrical imagelist? (17x16) It's a workaround and a set of zero offset icons are needed for first column use. Create a 17x16 bitmap, draw the icon at a 1 pixel offset on it, then add that bitmap to the imagelist. For solid background colour only expandcollapse popup#include <GuiListView.au3> #include <GuiImageList.au3> #include <WinAPI.au3> _Main() Func _Main() Local $GUI, $hListView, $hImage, $hIcon $GUI = GUICreate("Another LVS_EX_GRIDLINES fix", 400, 300) $hListView = _GUICtrlListView_Create($GUI, "Column 1 | Column 2 | Column 3", 2, 2, 394, 268) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES)) _GUICtrlListView_SetTextBkColor($hListView, $COLOR_MONEYGREEN) _GUICtrlListView_SetBkColor($hListView, $COLOR_MONEYGREEN) $hImage = _GUIImageList_Create(17, 16, 5, 1 + 2) _GUICtrlListView_SetImageList($hListView, $hImage, 1) $hIcon = _WinAPI_LoadShell32Icon(23) _GUIImageList_OffsetIcon($hImage, $hIcon, $COLOR_MONEYGREEN, 16, 16) ;column 0 no left offset $hIcon = _WinAPI_LoadShell32Icon(40) ;_GUIImageList_ReplaceIcon($hImage, -1, $hIcon) ;comment below line and run this, 1 pixel clipped on left icon border /w LVS_EX_GRIDLINES style in Win7x64/XPx86 _GUIImageList_OffsetIcon($hImage, $hIcon, $COLOR_MONEYGREEN, 17, 16) ;column 1 1 pixel left offset $hIcon = _WinAPI_LoadShell32Icon(80) _GUIImageList_OffsetIcon($hImage, $hIcon, $COLOR_MONEYGREEN, 17, 16) ;column 2 1 pixel left offset _GUICtrlListView_AddItem($hListView, "Item0", 0) _GUICtrlListView_AddSubItem($hListView, 0, "Subitem1", 1, 1) _GUICtrlListView_AddSubItem($hListView, 0, "Subitem2", 2, 2) GUISetState() Do Until GUIGetMsg() = -3 _GUIImageList_Destroy($hImage) GUIDelete() Exit EndFunc ;==>_Main Func _GUIImageList_OffsetIcon(ByRef $hImgLst, ByRef $hIcon, $iColor, $iW, $iH) ;rover 2k12 Local $hDC, $hMemDC, $hBitmap $hDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hDC) $hBitmap = _WinAPI_CreateSolidBitmap(0, $iColor, _GUIImageList_GetIconWidth($hImgLst), $iH) _WinAPI_SelectObject($hMemDC, $hBitmap) _WinAPI_ReleaseDC(0, $hDC) _WinAPI_DrawIconEx($hMemDC, $iW - $iH, 0, $hIcon, $iH, $iH, 0, 0, 3) _WinAPI_DeleteDC($hMemDC) _GUIImageList_Add($hImgLst, $hBitmap) _WinAPI_DeleteObject($hBitmap) _WinAPI_DestroyIcon($hIcon) EndFunc ;==>_GUIImageList_OffsetIcon I see fascists... Link to comment Share on other sites More sharing options...
TsukasaX Posted March 29, 2012 Author Share Posted March 29, 2012 (edited) I also see this issue in Win7 x64 as well as XP SP3 x86Might I suggest an asymmetrical imagelist? (17x16)It's a workaround and a set of zero offset icons are needed for first column use.Create a 17x16 bitmap, draw the icon at a 1 pixel offset on it, then add that bitmap to the imagelist.I did think about this, and this would probably work for putting a little more space on the right side of the icons in the first column. Only drawback I see is having duplicate icons for item vs subitem, but that isn't that big of a deal. I appreciate you posting such a large example of code. Edited March 29, 2012 by TsukasaX Link to comment Share on other sites More sharing options...
guinness Posted March 29, 2012 Share Posted March 29, 2012 (edited) rover, Great works as always, much appreciated. Edited March 29, 2012 by guinness 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 Link to comment Share on other sites More sharing options...
rover Posted March 30, 2012 Share Posted March 30, 2012 (edited) @TsukasaXI've looked into some of the old owner/custom drawn listview examples I have.That text offset on the left is changeable with both ownerdrawn and customdrawn listviews, but you have to paint all the text and the icons in a WM_DRAWITEM or WM_NOTIFY/NM_CUSTOMDRAW message handler,and there may be issues, and a lot of code to do this.Looking at a C# demo of a listview with subitem images on the Code Project from 2004, the gridlines do not overlap the icons.It may be ownerdrawn as the demo exe is not themed or as it is a managed code listvew perhaps there are fixes and features unavailable in AutoIt.Perhaps with AutoItObject and the new object support in AutoIt this code is within reach:http://www.codeproject.com/Articles/16009/A-Much-Easier-to-Use-ListView@GuinnessThanks Edited March 30, 2012 by rover I see fascists... Link to comment Share on other sites More sharing options...
TsukasaX Posted March 30, 2012 Author Share Posted March 30, 2012 I've looked into some of the old owner/custom drawn listview examples I have.That text offset on the left is changeable with both ownerdrawn and customdrawn listviews, but you have to paint all the text and the icons in a WM_DRAWITEM or WM_NOTIFY/NM_CUSTOMDRAW message handler,and there may be issues, and a lot of code to do this.Looking at a C# demo of a listview with subitem images on the Code Project from 2004, the gridlines do not overlap the icons.It may be ownerdrawn as the demo exe is not themed or as it is a managed code listvew perhaps there are fixes and features unavailable in AutoIt.Perhaps with AutoItObject and the new object support in AutoIt this code is within reach:http://www.codeproject.com/Articles/16009/A-Much-Easier-to-Use-ListViewI've worked with WM_NOTIFY for custom colored row backgrounds, but that's a lot of work for this current project. The listviews in that second link look awesome, but I think it would again be too much work.I haven't had time to implement your code fully, but I think padding first column icons with two spaces on the right, and then subitem icons with two spaces on the left would be the look I'm trying to achieve. Maybe three pixels, but that would be easy to change. Again, thank you for your time. Link to comment Share on other sites More sharing options...
TsukasaX Posted March 30, 2012 Author Share Posted March 30, 2012 I haven't had time to implement your code fully, but I think padding first column icons with two spaces on the right, and then subitem icons with two spaces on the left would be the look I'm trying to achieve. Maybe three pixels, but that would be easy to change. Again, thank you for your time.Here is with a 4 pixel pad, I think it looks fine. I think six pixels is what's necessary to have the left/right pad on both be the same, but that is too much padding for the icon. 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