Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Flat Look and Composite Components
Flat Look and Composite Components [message #457156] Mon, 20 June 2005 09:43
Michael Pellaton is currently offline Michael PellatonFriend
Messages: 289
Registered: July 2009
Senior Member
Hello

I have the following set-up:
- class DText delegating to a Text
- class XText derived from Composite containing a DText and an Image
- class DFormToolkit delegating to FormToolkit, containing a method to
create DText and XText components.

When I apply the flat form layout to DText everything works fine.

When I apply it to the composite, the border is drawn around the
composite including the image instead of just the Text.

In createXText of DFormToolkit I do the following:

public XText createValidatedText(Composite parent) {
XText vText = new XText(parent, SWT.FLAT);
vText.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
adapt(vText, true, true);
return vText;
}

Even setting the Data on the delegate component
vText.getDText().setData(...); or the original Text component
vText.getDText().getText().setData(...); does not help (in these two
cases, no border is drawn at all).

Any ideas what I shall do if the border of the flat look should be drawn
around a component that is contained in a composite component?

Is the only way to avoid this problem to change the composite component
to one that derives directly from Text?

Thanks for any help

Michael
Previous Topic:Problem with posting key events
Next Topic:longhorn
Goto Forum:
  


Current Time: Thu Sep 26 16:51:08 GMT 2024

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

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

Back to the top