Purpose of @GUI_DragId & @GUI_DropId
By
TheDcoder, in AutoIt General Help and Support
-
Similar Content
-
By TheDcoder
Hello, I am confused about using these 2 macros
I already have a program with some ListView controls in it... I am thinking about adding drag & drop functionality to them.. but... I can't explain...
Here is my GUI:
#include-once ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiButton.au3> #include <GuiListView.au3> Local $hGUI = GUICreate("GUI",350,215,-1,-1,-1,-1) GUISetBkColor(0xFFFFFF,$hGUI) Local $hListView = GUICtrlCreatelistview("Column 1|Column 2",5,7,339,169,4,544) Local $hButtonCopy2 = GUICtrlCreateButton("Copy Column 2",245,180,100,30,-1,-1) Local $hButtonAdd = GUICtrlCreateButton("Add ListViewItem",110,180,128,30,-1,-1) Local $hButtonCopy1 = GUICtrlCreateButton("Copy Column 1",4,180,100,30,-1,-1) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $hButtonAdd GUICtrlCreateListViewItem(InputBox("Enter", "Enter text for column 1") & '|' & InputBox("Enter", "Enter text for column 2"), $hListView) Case $hButtonCopy1 $aData = StringSplit(GUICtrlRead(GUICtrlRead($hListView)), '|') If IsArray($aData) = 1 Then ClipPut($aData[1]) ; Avoid error Case $hButtonCopy2 $aData = StringSplit(GUICtrlRead(GUICtrlRead($hListView)), '|') If IsArray($aData) = 1 Then ClipPut($aData[2]) ; Avoid error EndSwitch WEnd
So, what I need is a good example of using them in a normal my GUI with a ListView control. Thanks in Advance, TD
P.S Don't blame for using magic numbers, my GUI designer did it.
-