Stuempi Posted December 14, 2009 Posted December 14, 2009 (edited) Hi there, so I'm working at the moment at a graphical interface to change values in my ini-file. So far everything is fine and I think I progged sometimes a bit sloppy, but everything is working nevertheless. Now I got troubles changing an already created listviewitem. I have several columns and want to change the value in column number 4 in the line I right-click, there comes up an context menu with two options and in case which option I choose, the column should be updated (and in the background the value in the ini-file). I understand that I have to update the line with GuiCtrlSetData, but I'm a bit confused how to do it for the right line. I worked it out so far that the value was correctly changed but in the last line of all the listviewitems. How can I specify that the value has to be changed in the line I right-clicked? In the Ini-file the value is changed correctly for the exact $context_id (= all listviewitems are numbered) This is the code I made for clicking the option 1 in my context menu: Case $msg = $context_activate $context_id = StringLeft(GUICtrlRead(GUICtrlRead($overview)), 2) $context_status = IniRead("test.ini", $context_id, "Status", "") If $context_status = "aktiv" Then MsgBox("", "", "already active") ElseIf $context_status = "inaktiv" Then Iniwrite("test.ini", $context_id, "Status", "aktiv") GuiCtrlSetData($count_array, "|||aktiv") MsgBox("", "", "Activated") Else MsgBox("", "", "Failed reading status.") EndIf And to be more clear: $count_array = IniReadSectionNames("test.ini") I really hope you can help me with this... thanks in advance. Edited December 14, 2009 by Stuempi
Stuempi Posted December 14, 2009 Author Posted December 14, 2009 I found another way to solve my issue... thanks nevertheless.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now