Skip to main content


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] Thu, 05 July 2012 01:56 Go to next message
ishk gunathilake is currently offline ishk gunathilakeFriend
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 08: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 15:19 Go to previous message
ishk gunathilake is currently offline ishk gunathilakeFriend
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 Apr 25 14:23:47 GMT 2024

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

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

Back to the top