Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Adding form toolkit 'adapt' call(Adding a call to adapt a control after it is constructed.)
Adding form toolkit 'adapt' call [message #989605] Thu, 06 December 2012 17:40
Chris White is currently offline Chris White
Messages: 6
Registered: January 2010
Junior Member
I have subclass of CellEditor that I want to add to a form.

My wb-component.xml looks like:

<?xml version="1.0" encoding="UTF-8"?>
<component xmlns="http://www.eclipse.org/wb/WBPComponent">
<description>String form field editor</description>
<!-- CREATION -->
<creation>
<source><![CDATA[new com.thrasys.ui.formfield.StringFormFieldEditor(%parent%, managedForm.getToolkit().getBorderStyle() | managedForm.getToolkit().getOrientation() | org.eclipse.swt.SWT.BORDER | org.eclipse.swt.SWT.SINGLE)]]></source>
</creation>

</component>

Dropping the component on the palette creates the following code.

StringFormFieldEditor stringFormFieldEditor_1 = new StringFormFieldEditor(composite, managedForm.getToolkit().getBorderStyle() | managedForm.getToolkit().getOrientation() | SWT.BORDER | SWT.SINGLE);
Control control_1 = stringFormFieldEditor_1.getControl();

I am trying to configure the component so that it also adds this line:
managedForm.getToolkit().adapt(control_1, true, true);

Is this possible?

Chris

[Updated on: Thu, 06 December 2012 18:00]

Report message to a moderator

Previous Topic:Instance factories with constructor
Next Topic:possible bug with save-acton "Add 'this' qualifier to unqualified field accesses" and acti
Goto Forum:
  


Current Time: Sat Aug 23 09:24:10 EDT 2014

Powered by FUDForum. Page generated in 0.02181 seconds