Using bitmaps to skin an applications?

a)What is the easiest way to replace the graphics for the already available components such as all types of sliders? I have already looked at the lookandfeel class but find it hard to understand the action flow or the method we need to follow to apply my own Images to represent the components. I do not want to use vector graphics but my own rendered images for such things as rotary dials, toggle switches, sliders ect, and cannot see a straight forward solution. Some code examples would really help! I can’t find a single juce app with source as an example that looks different than others, i.e. not using the standard shinylookandfeel but bitmaps.

b)In Jucer App, we can add a new button where I can easly assign the graphics to certain mouse events, can I do this with say sliders?

c) What is the difference between DrawableButton and PaintButton?what are drawables?

a) roll your own Slider subclass that override the paint method and get rid of the look and feel drawing calls. start with a simple linear slider, then u can always specialize it to support more slider types :slight_smile:

here you can find an example:

b) no you can’t, unless you write one like this
c) drawable are a specialized class where you can draw on it, and use like an image, but that use the paint method, instead of the framebuffer…

Thanks Kraken, this gives me something to work with, can’t beleive I didn’t notice that example. So, does this mean if I want to implement a rotary type slider I have to explicity do the rotations of the images, based on the rotarty slider value or is there a way for me to atach my image to the rotary dial. Any suggestions or clues go a long way. Also could you elaborate on the difference between paint method and framebuffer? for drawables.

the best way (memory intensive but less cpu calculations involved) is to precalculate images rotated, and stitch them to a single image file, then in your slider class, you will take the image offset you need (based on the slider value). pretty easy …