We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5b8877 commit 8b2c28dCopy full SHA for 8b2c28d
1 file changed
SFTPSyncUI/MainForm.cs
@@ -159,15 +159,15 @@ private void AppendLog(string message)
159
160
private void AddMessage(string message)
161
{
162
- listBoxMessages.Items.Add(message);
+ listBoxMessages.Items.Insert(0, message);
163
164
- // Optional: auto-scroll to bottom
165
- listBoxMessages.TopIndex = listBoxMessages.Items.Count - 1;
+ // Keep newest at top
+ listBoxMessages.TopIndex = 0;
166
167
// Optional: trim excess from UI if _log did a dequeue
168
if (listBoxMessages.Items.Count > 1000)
169
170
- listBoxMessages.Items.RemoveAt(0);
+ listBoxMessages.Items.RemoveAt(listBoxMessages.Items.Count - 1);
171
}
172
173
0 commit comments