I think you might have contradicted yourself in that post a bit, so I’m not quite sure what you want!
Using ImageOnButtonBackground gives you a normal button background, with an image on top. The button behaves as it normally would (it highlights when the mouse is over it, and darkens when pressed), and the images are drawn on top of that. setClickingTogglesState (true) would make the button switch ‘on’ and ‘off’ when you click it, so it has additional appearances for ‘on’. setClickingTogglesState (false) makes the button NOT switch on or off when you click it, but just change when the button is down (or the mouse is over it).
You say at the start it should only be highlighted when clicked; that sounds like you mean that you don’t want it to actually highlight when the mouse is hovering over it, so you don’t want an ‘Over’ image.
At the end, however, you say you don’t want setClickingTogglesState(true), because “it should stay highlighted after the mouse is up”; but that’s exactly what that does. When you click on it, it becomes ‘on’, so when you release the button it appears ‘on’. With setClickingTogglesState(false), when you release the button, it goes back to how it was.
I guess maybe your problem is that you’ve given the images to the wrong parameters? With ImageAboveTextLabel, obviously you don’t get the button background, you just get the images you’ve set. Maybe the ‘highlighting’ you’re talking about is the feedback provided by the button background? So it just comes down to making sure it’s showing the correct images for each state.
The ‘normal’ image parameter is the one it shows normally. If you want it to stay ‘visibly different’ after it has been clicked, you want setClickingTogglesState(true), and the ‘different’ image should be the ‘normalImageOn’ AND the ‘downImage’ parameter (so that it’s different before you release the mouse button too). If not, you’ll want setClickingTogglesState(false), and just have the different image for the ‘downImage’ parameter.
You might, of course, be talking about the highlighting that goes behind the image, which doesn’t show until you release the button, as it’s not toggled ‘on’ til then. This toggling behaviour is not a bug, it’s a feature (if you accidentally click on a button, you can keep your mouse button held down and drag off the button before you release to cancel it). If you want it to highlight differently (e.g. a colour to show that the mouse is down or over), then it’d requre editing DrawableButton::getBackgroundColour(), checking whether the button ‘isDown()’ in addition to its toggle state.
Hopefully your problem is covered in one of the above minirambles.