In the EditClick() you have this line:
seek(goalsfile,filesize(goalsfile));
write(goalsfile, info);
That means that when you click the "Update" that the info is written
to the end of the file. You want it to
overwrite the current record.
So you need to seek to the place of the item you clicked. It's the same as with the "Delete" button. You need to use the Items.Object to seek() the correct place and then overwrite the record.
seek(goalsfile, PtrInt(ListBox1.Items.Objects[ListBox1.ItemIndex]));
write(goalsfile, info);
After that you need to refresh your Listbox to see the percentage.
B.T.W. the percentage calculation is wrong.
info.progress div info.goal * 100
When progress is 30 and goal is 100 you get 30 div 100 which is 0, times 100 which is still 0
Try to fix that.
I've also noticed another weird thing. Look at this:
else
edit3.visible:=true;
Edit.caption:='Update';
You see that edit3.visible line belongs to the else but you also indented Edit.Caption line. Which is wrong because that one isn't inbetween begin/end so it does not belong to the else statement.
My advise is to use correct indentation.
To help you with that you can install the jcfidelazarus package.
Package > Install/Uninstall packages. Choose jcfidelazarus from the right panel if it's not already at the left and click Install selection. Click Save and rebuild IDE.
After you installed that package you can press Ctrl+D to automatically use the correct indentation.
Now you see your code
end
else
edit3.Visible := True;
Edit.Caption := 'Update';
and you see directly places where your code is incorrect. It will help you a lot to analyse your code and spot errors.