Hi,
What I want is an uneditable "box" that shows records (rows of text). Through Autoit magic the user adds row(s) and hopefully can delete row(s), but the content of the rows are not editable.
I'd like to have mouse right click copy and delete (but not paste). ..But the listbox seems OK, Through buttons a user can add and delete. And row text can't be edited (at least by default) so it's cool.
But I can't get deletion working right. I want single row and multiple row deletion ( the user is able to select multiple rows) via *one* " delete" button on the GUI. The code works weirdly for multiple deletes, after a multiple delete is made then a line gets selected for no apparent reason and futher delete attempts give unexpected results. (It's not apparent and unexpected to me only because I don't get what the problem is). Thanks, help appreciated.
#include <GUIConstantsEx.au3>
#include <FF.au3>
#include <Array.au3>
#include <GuiListBox.au3>
#include <StaticConstants.au3>
#include <DateTimeConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Date.au3>
snip....
$mylist = GUICtrlCreateList("", 200, 32, 320, 260, $LBS_EXTENDEDSEL)
snip...
Case $msg = $delrowurl ; one delete button for single and multiple selections
$sItems = _GUICtrlListBox_GetSelItems($mylist)
ConsoleWrite(' ' & $sItems[0] & @LF)
If $sItems[0] = 1 Then
_GUICtrlListBox_DeleteString($mylist, _GUICtrlListBox_GetCurSel($mylist))
ElseIf $sItems[0] > 1 Then
For $sli = 1 To UBound($sItems) - 1
ConsoleWrite(' ' & $sli & ' ')
_GUICtrlListBox_DeleteString($mylist, $sli)
Next
EndIf
....