Projects Tools Projects Hosted Projects
|
This place is avalaible to define non official FAQ about SWT and JFace. Here is the official FAQ. 1) Where find custom components? 2) Where find tutorials about SWT/JFace? 3) Where find GUI builders for SWT/JFace? 4) Where find snipets(useful pieces of code)? Snipets I have a Canvas that displays a large image. How do I stop if from flickering?There are some style bits you can use when creating the Canvas - see SWT.NO_REDRAW_RESIZE and SWT.NO_BACKGROUND.SWT.NO_BACKGROUND is appropriate whenever you have a Canvas whose painting entirely fills its area; images are the most common case. How can I make a transparent widget? Why doesn't NO_BACKGROUND work?You can't. Transparent widgets in the sense that other widgets show through aren't supported. NO_BACKGROUND just means the background color isn't drawn. In Windows, this means you see the desktop as a background! Widgets "behind" a NO_BACKGROUND canvas aren't drawn because the area of the foreground canvas is cut out of their drawing region.How do I write a standalone SWT app?Very easily. Example code (22 lines including imports) and how to set the app to run from Eclipse are here, and there is more advice about running in different environments on the same page.Is it legal to use SWT in my standalone app?Lots of people think so. For more info see the license questions in the General page.Why doesn't GIF transparency work in some of my controls?If you are running Windows, according to Steve Northover the problem is some older controls only support "Windows formats like HBITMAP and HICON". You could convert your .gif to an platform-dependent icon, or try to color-match the GIF with its expected background.Startup problem : java.lang.NoClassDefFoundError: org/eclipse/swt/internal/carbon/Rect or similarPlease note that for Eclipse 3.0M9 Carbon (Mac OS), as the swt.jar file is split into two, you classpath must include both swt.jar and swt-pi.jar. See bug report 63683.OLEautomation in EclipseThe COM support in SWT is for ActiveX controls and OLE Documents only. Itdoes not extend to making wrapper objects for arbitrary COM objects. It uses the OLE helper functions such as OleCreateFromFile and OleCreate rather than using COGetClassObject and building the objects from scratch. There is support through COMObject for implementing new COM interfaces and there is support for using IDispatch as a means for calling out to other COM interfaces. These are used for interacting with the OLE Automation interfaces of ActiveX controls and OLE documents. Support for COM in general is a much bigger task - it involves supporting a variety of threading models, client/server models and providing a generic way to implement and call arbitrary COM interfaces. In short, this is not available in R2.0. You can enter a feature request against Platform SWT for future consideration. Bear in mind, however, that this would involve a large amount of effort and is currently not a primary focus of Eclipse. If you are an expert in the area and are able to contribute to the development this would have a much greater chance of being addressed. Veronika Irvine I want to know is where a tool that takes IDL on input and returns SWT-based wrapper class? By other words - this tool should return a java source of a class based on org.eclipse.swt.ole.win32.OleControlSite and provide access to all properties/methods that are available for given COM-control ? Last Modified 5/5/06 8:55 AM | Hide Tools |