[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: How to resize a MessageDialog subclass and still see the button Bar
|
Dialog is an extensible class and it works great. I generally prefer to extend Composite, then create a Shell in the constructor and thus manually tune the Shell parameters so that it becomes a dialog. Dialog is just a wrapper class around a few Composite(s) and a Shell. Try SWT.DIALOG_TRIM and parenting Shell(s) on other Shell(s). It's fairly simple to simulate any number of the MessageBox styles. Remember, you can use the Display#getSystemImage(int) method along with one of the SWT.ICON_* styles to get the various system images (Warning, Error, Information, etc). Though, be forewarned that you should use a Canvas to render the image and not a Label. A Label will either create a black background for the image, or the image will be very pixelated. Anyway, good luck.