I’d like to put a KeyboardComponent’s scrollbuttons out of the way, as they’re overlapping the edge keys.
So I called “setScrollButtonsVisible(false)” and tried to “setLowestVisibleKey(…)” with dedicated buttons outside the keyboard.
But doing so sets the internal variable “canScroll” to false, causing a reset of “firstKey” to the value of “rangeStart” during “resized()”, so nothing happens.
My fix ist to “setScrollButtonsVisible(true)” and “setScrollButtonWidth(0)”.
This works, but throws “jassert (widthInPixels > 0);” in there when in debug mode.
My first suggestion is to remove this assertion as long it doesn’t irritate elsewhere.
In the long run however, it would be nice to (like Slider::TextEntryBoxPosition) implement an
ButtonsOnDemand = 0, // default, overlap on demand (current behaviour)
HideButtons, // no buttons, but still “scrollable”
ButtonsAlways, // looks like default, but always displayed
ButtonsBass, // two buttons below lowest key (on one end, no overlap!) one above the other, 1/2 height each
ButtonsTreble // like Bass, but at the upper/right end