INC/DEC Slider Button Positioning

Hey guys.

I am in need of some assistance. I currently have my own sliders which i’m deriving from the Juce::Slider class. The way I have these Sliders styled is with the inc/dec buttons, and a text box showing. The issue i’m having is I can figure out no way to make it so the inc and dec buttons are positioned on top of eachother.

By default it makes the inc/dec buttons so that they are next to each other horizontally. I need a way that I can make these slider buttons appear in a veritcal line. I have overridden createSliderButton which has allowed me to create my own Drawable buttons which is great. But I can not figure out a way to do what 'm trying to acheive. Any help would be greatly appreciated. Hopefully I am missing some simple trick here.

Thankyou

Tom

sorry, when I say on top of eachother I mean like this buttonExample

It looks like the slider will position the buttons differently depending on how much room is made available for the buttons:

        incDecButtonsSideBySide = buttonRect.getWidth() > buttonRect.getHeight();

You could try increasing the width of the text box using setTextBoxStyle so that the remaining space for the buttons is taller than it is wide.

1 Like

@reuk thanks so much for your help, thats solved it :slight_smile:

1 Like