image - SWT Button setImage(null) -


i want button not resize when setting image null.

button wrapped in custom colorselector jface. see here.

i've made own custom color selector, can set null image button.

e.g. background color null here:

my solutions:

  • set griddata swt.fill internally.
  • set widthhint or minimumwidth.
  • draw gradient rectangle on 'default image', set image button. (remember, cocoa buttons have gradient, solution if presenting button nothing's there)


    don't these. seem hardcore workarounds.

  • instead of setting null-image, may try set transparent image.


    Comments

    Popular posts from this blog

    javascript - DIV "hiding" when changing dropdown value -

    Does Firefox offer AppleScript support to get URL of windows? -

    android - How to install packaged app on Firefox for mobile? -