add/remove from txt file inside GUI
I need help to get further with this script
Test.txt contains lines like this:
I have managed to view the content of a txt file in the left side of a GUI like this:
Global $file = FileRead("Test.txt")
GUICreate("", 800, 800, 192, 124)
$control = GUICtrlCreateEdit($file, 0, 0, 400, 800, $ES_AUTOVSCROLL + $WS_VSCROLL + $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "@Arial Unicode MS")
GUICtrlSetState($control, $GUI_FOCUS) ;Makes sure that text is not highlighted by default
$nMsg = GUIGetMsg()
Okay so is it possible to make each line become a clickable item?
Say I want to delete Line2, then I highlight it and click a "remove" button.
Also an "add" button would be needed to add new lines
On Case $GUI_EVENT_CLOSE the changes should be saved to Test.txt (Or with a save button)
Is this possible?
I hope you can help me :-)