Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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
ishk gunathilake is currently offline ishk gunathilake
Messages: 27
Registered: April 2012
Junior Member
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
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

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
ishk gunathilake is currently offline ishk gunathilake
Messages: 27
Registered: April 2012
Junior Member
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: Thu Aug 21 20:12:19 EDT 2014

Powered by FUDForum. Page generated in 0.01516 seconds