int sliderHeight = 200;
// add a vertical slider
cp5.addSlider("slider")
.setPosition(100,305)
.setSize(20,sliderHeight)
.setRange(0,200)
.setValue(128)
;
// reposition the Label for controller 'slider'
cp5.getController("slider").getValueLabel().align(ControlP5.LEFT, ControlP5.BOTTOM_OUTSIDE);
Adding a vertical padding the length of slider seems to work as workaround:
cp5.getController("slider").getValueLabel().align(ControlP5.LEFT, ControlP5.BOTTOM_OUTSIDE).setPaddingY(-sliderHeight);
int sliderHeight = 200;
// add a vertical slider cp5.addSlider("slider") .setPosition(100,305) .setSize(20,sliderHeight) .setRange(0,200) .setValue(128) ;
// reposition the Label for controller 'slider' cp5.getController("slider").getValueLabel().align(ControlP5.LEFT, ControlP5.BOTTOM_OUTSIDE);
Adding a vertical padding the length of slider seems to work as workaround: cp5.getController("slider").getValueLabel().align(ControlP5.LEFT, ControlP5.BOTTOM_OUTSIDE).setPaddingY(-sliderHeight);