I am writing a logging client, that will listen for incoming messages on a certain port.
The message will come through | deliminated, and will contain the following:
[Type of message]|[message]|[taskID of total tasks]| [Time] – perhaps more:
In my winforms app I want to display this information to the user, I was thinking of adding rows to a data grid, but I would need the grid to autoscroll and perhaps have color coded lines. For example the row should be red, if it is an error message.
Is this the best control for the job?
Hard to imagine you’d want to allow the user to edit this. So a ListView with View = Details is appropriate. Autoscroll with EnsureVisible(), alternate line colors with ListViewItem.BackColor. Suppress the flicker you get by deriving your own class from it and setting the DoubleBuffered property to true in the constructor.