On 17-02-2020 08:48, mark wrote:

I have this code:

optionsButton = new Button(StockID.PREFERENCES);

I am happy with the icon but instead of the text "_Preferences" I want to set "_Options".

However, when I do that the icon disappears. Is it possible to have both the stock icon and my own custom text?

You would use setImage() to set the image separately from the text.

import gtk.Image;

button.setImage(new Image(StockID.PREFERENCES));