Struggling to find a suitable way to implement scrolling and updating data in a loop #2439
Replies: 3 comments 14 replies
-
You must update inside the Application.Mainloop.Invoke to use the main thread. |
Beta Was this translation helpful? Give feedback.
-
Ok. If you are using a |
Beta Was this translation helpful? Give feedback.
-
Another thing. So I have my ListView displaying a string list, I'm unsure how to "do stuff" when I click on something in that List. I can see from the API reference that I need to create an event - OpenSelectedItem. But I'm not entirely sure how to make it all function. Maybe it's my experience level (2 years in University and currently on an Industrial Year), but I'm having a hard time following a lot of the documentation |
Beta Was this translation helpful? Give feedback.
-
I'll try and explain this the best way I can.
I basically have a background thread that every 10ms sends a load of commands through the serial port and then receives a lot of data back which is decoded and displayed in my program.
I have a List that stores the received data and then displays it in labels. But, I'm having an issue finding the best way to have it constantly updating but also have the list in a scroll-able view.
I originally had a FrameView that displayed all the data and that was refreshing every 10ms and working perfectly, but struggled to implement scrolling.
I've recently switched to a ListView, which was near perfect, scrolling was working and everything was displaying, except it only updated when there was mouse movement / keyboard input. Not ideal.
Using the SetSourceAsync Task, I've managed to achieve the constant update of the values needed, but it interferes with the scrolling and constantly moves back to the top of the list (so you can't scroll down).
I'm unsure what else try or have I overlooked a simple way of implementing this?
Many thanks in advanced
Beta Was this translation helpful? Give feedback.
All reactions