5 posts in this topic
Is it possible to set a different text direction/layout (not alignment) for a Listview column?
So trying to get an INI section in a listView with checkboxes. Was able to get the the section values to show until i add the checkboxes and now only the keys are show up. Between reading the Help file, Forum Topic and trying other code option. I have been unable to answer this problem. I'm assuming its something very basic I'm overlooking since this it's day 21 of learning Autoit.
If someone could please advise I would appreciate the assistance.
Here's the code:
#include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <GUIListView.au3> #include <Array.au3> #include <File.au3> #include <ListViewConstants.au3> Global $sIniPath = "installLog.ini" ;ConsoleWrite($sIniPath) $iniSctionNames = IniReadSectionNames($sIniPath) ;_ArrayDisplay($iniSctionNames, "$iniSctionNames") $keys2 = IniReadSection($sIniPath, $iniSctionNames) _ArrayDisplay($keys2 , "$keys2") ; Create GUI $hGUI = GUICreate("Test", 300, 250) ; Create ListView $cLV = GUICtrlCreateListView("", 10, 10, 200, 200,$LVS_List,$LVS_EX_CHECKBOXES) _GUICtrlListView_AddColumn($cLV, $keys2, 100) _GUICtrlListView_AddColumn($cLV, $keys2, 100) ;_GUICtrlListView_AddItem($cLV, $keys2, 0) _GUICtrlListView_AddArray($cLV, $keys2) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd And the INI file I'm using.
[OldSysInfo] 4=192.168.0.4|DESKTOP-RDIU2SN|R90M05Q8 5=192.168.0.5|SD0123456789101|R9WGP9P 6=192.168.0.6|SD0123456789102|R9WGP9PT 3=192.168.0.3|DESKTOP-3RS4LKL|R9WGP9P 23=192.168.0.23|SD0123456789102|MXL1234P5I [PrinterIp] 50=192.168.0.50 48=192.168.0.48 47=192.168.0.47 [NewSysInfo] newPC = SD0123456789adfs|192.168.0.185|2UA1234FTR Also if possible could you explain how to hide the Array count row as well.
I'm trying to use the FileMove function to rename a bunch of text files.
Some of the files have "_1" at the end of their name, for example, "File123_1.txt". I want to remove the "_1" so it would become "File123.txt".
What I currently have...
FileMove($sSource & "\*_1.txt", $sDestination & "\*.txt")
But since I'm using a wildcard, it doesn't appear to be working. I think it's just replacing .txt with .txt. Am I going about this the wrong way? How can I use wildcards and still accomplish this?
Any help is greatly appreciated ^__^
I have date in the string format as "DD-MM-YYYY".
I need to get yesterday's date from it.
I tried converting this from _DateTimeFormat but not working.
Is there any direct UDF available to get this.?
I'm trying to create a listview with subitem icons and I achieved this by simply rearranging the order of the columns, so that the first column is in the middle, thus appearing as a subitem with an icon - this method prevents the "icon clipping" that happens when using subitem icons in a listview. My issue is that when I select a row that does not have an icon, the space where the icon would be is white. Is there a way to make this transparent, so it looks like the entire row is selected?
Here's an example - click the second listview item/row to see a blank space where the icon would be.
#include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <WindowsConstants.au3> _Main() Func _Main() Local $hGui, $listview, $hImage Local $iLV_EXStyle_NoChecks = BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES, $LVS_EX_DOUBLEBUFFER, $LVS_EX_HEADERDRAGDROP) $hGui = GUICreate("Listview Test With Icons", 400, 300) $listview = GUICtrlCreateListView("Col 1|Col 2|Col 3", 2, 2, 394, 268, BitOR($LVS_REPORT, $LVS_SHAREIMAGELISTS)) _GUICtrlListView_SetExtendedListViewStyle($listview, $iLV_EXStyle_NoChecks) GUISetState() ; Create the image list $hImage = _GUIImageList_Create(16, 16, 5, 3) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 165) _GUICtrlListView_SetImageList($listview, $hImage, 1) ; Set the order so the first column is moved to the middle, ; acting like a subitem with an icon _GUICtrlListView_SetColumnOrder($listview, "1|0|2") ; Add the items GUICtrlCreateListViewItem("Item1|Item2|Item3", $listview) GUICtrlCreateListViewItem("Item4|Item5|Item6", $listview) ; Set an icon for just the first item _GUICtrlListView_SetItemImage($listview, 0, 0) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main