You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
open a Winform project in Visual Studio (i used v2019)
Drop a vertical SplitContainer into the Form.
Drop a "scottPlotUC" control into the right Panel.
Set Dock property to Fill for this plot control.
Compile and run the project.
Discover the following: when you drag and move the splitter bar, it moves as expected. However, only once! The next attempt fails. The only way to make the vertical splitter movable again, is to resize the whole Form window, by changing its width or height by the mouse. After such Window resize, you can again move the splitter. But only once!
What causes this behaviour? If I drop the simple MS Chart into the right Panel of the SplitContainer, it behaves as expected.
Thanks if you can fix this, and also thanks for the very useful package! SiC_VQ_data_analyzer.zip
The text was updated successfully, but these errors were encountered:
@bukkideme thanks for bringing this to my attention!
This bug is now fixed in ScottPlot 3.0.4 (available on NuGet)
Recreating this bug (without ScottPlot)
The fundamental problem seems to be that calling Application.DoEvents() on SplitterMoved (or a child's SizeChanged event) causes the split to freeze. Interestingly resizing the form unfreezes the splitter.
create a new Winform project
drop a SplitContainer on the form
add Application.DoEvents() to the SplitContainer's SplitterMoved event
resize a bunch of times and eventually the split will freeze
once frozen, resizing the form unfreezes it
The Fix
The ScottPlot user control's SizeChanged event calls Render() which was calling Application.DoEvents(). I removed that call (5e485a9) and the program seems to be working well without it and the SplitContainer bug is gone.
... just realized the Application.DoEvents() is required for smooth left-click-drag scrolling. I'll be putting that line back in, but only calling it if the user is actively panning/zooming. This will prevent it from being called when resizing a SplitContainer
How to reproduce the issue:
Discover the following: when you drag and move the splitter bar, it moves as expected. However, only once! The next attempt fails. The only way to make the vertical splitter movable again, is to resize the whole Form window, by changing its width or height by the mouse. After such Window resize, you can again move the splitter. But only once!
What causes this behaviour? If I drop the simple MS Chart into the right Panel of the SplitContainer, it behaves as expected.
Thanks if you can fix this, and also thanks for the very useful package!
SiC_VQ_data_analyzer.zip
The text was updated successfully, but these errors were encountered: