question regarding LookAndFeel::positionComboBoxText



I’m confused by some code in void LookAndFeel::positionComboBoxText

    label.setBounds (1, 1,
                     box.getWidth() + 3 - box.getHeight(),
                     box.getHeight() - 2);

what is the subtraction of box.getHeight() in the width calculation?


Sorry, that’s not very clearly written! It’s just the distance it leaves at the end of the box, for the drop-down button. The button is square, so its width is the same as the box’s height.


Aha! Thanks… :slight_smile: