I know it's in the name but can I get clarity on what SetPanelScrollableArea is supposed to do?
Like what should I expect MusicBee to do when I've defined the following?
mbApi.MB_SetPanelScrollableArea(panel, new Size(100, 200), true);
I've been working on a quiz plugin for the past few weeks that's near-ready.
I just need to get some scrolling to take place in there if ever the panel size is too small.
Can I rely on that function to get me the scrollbar that's showing up in the 'Upcoming Tracks' panel below or do I just have to add my own scroll control.
(https://i.imgur.com/STdbF6y.png)
I've modified the panel passed in by the OnDockablePanelCreated method using MB_AddPanel, but I'm still having no luck I'm afraid.
Below is what I have and according to my understanding of the above:
- this should introduce a vertical scrollbar given that the scrollArea height will always be 100px longer than the actual panel height.
- but whether I've used the below in the OnDockablePanelCreated method or the paint event itself, I'm still unable to get it to appear.
panel = mbApi.MB_AddPanel(panel, (PluginPanelDock)1);
mbApi.MB_SetPanelScrollableArea(panel, new Size(panel.Width, panel.Height + 100), true);
Hope I'm still not misunderstanding how this should be used.
Source files are here (https://drive.google.com/drive/folders/11XDvOSc2KYeG5GhFi2s9r-7_JQzK1Uqu?usp=sharing) in case you may want to have a look.