Flat Look and Composite Components [message #457156] |
Mon, 20 June 2005 09:43 |
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02736 seconds