Jump to content

Norm73

Active Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Norm73

  1. The pixelsearch made a very good (complete) example in which the search for columns is done. What do you have to do so that the search in the entire list is carried out in all columns at the same time? For example, if I wrote the number 7 so that this number would appear in all columns.
  2. Of course my example is not ideal. (It could be better)☹️ I finally found what I needed. And it was in front of your nose, so to speak, the whole time The _GUICtrlListView_FindParam () function from the same library returns the index of the point from the control-ID (GUI-Autoit). It also works fine with the sorting.
  3. You have done a great job. Many thanks. I would like to use these functions _GUICtrlListView_MapIndexToID () _GUICtrlListView_MapIDToIndex () unfortunately they do not work with natural functions. I used the _GUICtrlListView_MapIDToIndex in my example above and it only returns -1. It may be that the control ID is changed in the other script when sorting, but it works for me, as in the instructions. ArrayBinarySearch -> very good advice, I'll keep that out of sight. Unfortunately, the question is always not resolved whether there is an alternative to the _GUICtrlListView_MapIDToIndex function that will work in my example.😢
  4. many thanks for the explanation and very good example. I've been busy with the question for a week and now I also know the difference between the Autoit ID and the ID from GuiListView.au3. I'm making a big list of native features. If I choose a separate item, this is not a problem. I have to find out without picking a point. The list is static and does not change, nothing is deleted. I have an array list with all the internal autoit IDs of the list so I don't have to keep track of how the list is sorted. I can read out a point immediately or put a check mark. But that's where it ends. All other options (native or not) work with index and not IDs. I cannot use the _GUICtrlListView_SetItemParam option because I work with it natively. Of course I can query every point in a cycle, but that will take a long time in a large table. The best way would be to get the index directly. But how, I don't know.
  5. Hello, I can't find an alternative for the _GUICtrlListView_MapIndexToID function that doesn't work for me. Is it even possible to find the index from ID-Control in ListView? I thank you in advance #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> Example() Func Example() GUICreate("listview items", 320, 450, -1, -1, -1, $WS_EX_ACCEPTFILES) GUISetBkColor(0x00E0FFFF) ; will change background color Local $sLb = GUICtrlCreateLabel("Number Item-Index", 20, 335) Local $nImp = GUICtrlCreateInput("", 20, 350, 150, 24, 0x2000) ;$ES_NUMBER Local $idButton = GUICtrlCreateButton("Index -> Control-ID"& @CRLF &"Control-ID -> Index ?", 20, 380, 150, 48, BitOR(0x2000, 0x0100)) ;$BS_MULTILINE GUICtrlSetFont(-1, 11) Local $idListview = GUICtrlCreateListView("col 1 |col 2 |col 3 |col 4 |", 10, 10, 300, 300) ;,$LVS_SORTDESCENDING) Local $nP = 0 For $nN = 0 To 10 GUICtrlCreateListViewItem("item "& $nN &"|col "& $nP+1 &"|col "& $nP+2 &"|col "& $nP+3, $idListview) $nP += 1 Next GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton Local $nNr = Number(GUICtrlRead($nImp)) If $nNr >= 0 And $nNr < 11 Then Local $nID = _GUICtrlListView_GetItemParam($idListview, $nNr) Local $nIndex = _GUICtrlListView_MapIndexToID($idListview, $nID) MsgBox($MB_SYSTEMMODAL, "listview", "Input Index = "& $nNr & @CRLF &"Index To ID-Control -> "& $nID & @CRLF &"ID-Control To Index -> "& $nIndex) EndIf EndSwitch WEnd EndFunc ;==>Example
×
×
  • Create New...