Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » cannot remove the title icon from dialog box(cannot remove the title icon from dialog box)
cannot remove the title icon from dialog box [message #893625] Wed, 04 July 2012 21:56 Go to next message
Eclipse UserFriend
hi,
I want to remove the title bar icon from dialog box. here is my code


import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class MainClass {


public static void main(String[] a) {
Display d = new Display();
Shell s = new Shell(d);
s.setSize(500,500);

s.setImage(new Image(d, "C:\\Users\\Ishara\\Desktop\\resources.png"));
s.setText("A Shell Example");
s.open();
while(!s.isDisposed()){
if(!d.readAndDispatch())
d.sleep();
}
d.dispose();
}
}


when i commented the s.setImage, it still shows the default icon .when i put a 1px image there, it still getting the image default size.plz tell me a way to remove that icon from dialog
Re: cannot remove the title icon from dialog box [message #893673 is a reply to message #893625] Thu, 05 July 2012 04:18 Go to previous messageGo to next message
Eclipse UserFriend
have you tried setImage(null)?
Re: cannot remove the title icon from dialog box [message #893826 is a reply to message #893673] Thu, 05 July 2012 11:19 Go to previous message
Eclipse UserFriend
yes i tried setImage(null), but it also gave the default image at the top left corner. Sad
Previous Topic:Missing title in main shell window for RCP app from 3.7 running under 4.2
Next Topic:Menu contribution confusion
Goto Forum:
  


Current Time: Wed Jul 16 06:25:19 EDT 2025

Powered by FUDForum. Page generated in 0.92153 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top