SWT: custom MessageBox / more text / how to get the icons?
i want to display a second, not bold, text in my MessageBox, like seen for OSX here: http://welcome.solutions.brother.com/NR/rdonlyres/1EA4CC0C-F0B9-45D3-BD2C-EF2C430E3FAD/15107/error2.gif
Is there a way to do this with MessageBox? If not, I would create m开发者_JS百科y own Dialog, problem is that i don't know how to load the appropriate icons.
Unfortunately, MessageBox is fairly constrained in its functionality. You can get the system icon from the Display class and then set it in a label:
final Image warningImage = getShell().getDisplay().getSystemImage(SWT.ICON_WARNING);
final Label imageLabel = new Label(dialogArea, SWT.NONE);
imageLabel.setImage(image);
精彩评论