Okay, i made this to combat the GUI restrictions i face when trying to save space yet maintain a large number of editable fields.
here’s a link to the file - it’s just a single header so it’s a snap to include in any projects you may have. Just think of it as a slider that works as a label (or vice versa) and you’ve got it.
[ZIP just holds ‘.h’ file, nothing more - i posted both just for fun]
http://haydxn.net/content/JUCE/TextBoxSlider.h
http://haydxn.net/content/JUCE/TextBoxSlider.zip
This widget should come in handy for various things. I’ve just gotten it working, and it behaves exactly like the similar controls in energyXT; your numerical parameter display acts as a slider when you drag it. So you have a number on the screen, and if you want to make it bigger, you simply click and drag upwards, or downwards to decrease the value. You can also double-click the parameter to edit it via typed entry.
I’ve not done any checking or refining on it yet - i’ve just gotten it working and wanted to post it to see if anyone was interested!
as far as interface stuff goes, it’s derived from JUCE::Label so all the display/formatting guff is exactly the same. Other things like setValue and whatnot are stolen from the JUCE::Slider class. Currently it’s fixed to velocityBased and vertical control behaviour.
EDIT: Note that this also was made before i started to properly look at the Label behaviour, so there are a number of ways it could be improved! I’ll post any changes.
EDIT2: Also, i’ve not looked fully into the way that the slider mechanism itself works - you can see i’ve just copy/pasted the necessary parts! i’ll get this stuff improved v. soon!