Home » Eclipse Projects » Eclipse Platform » Form.reflow()
Form.reflow() [message #334223] |
Mon, 26 January 2009 20:08  |
Eclipse User |
|
|
|
Originally posted by: riwright.adobe.com
(If this is the wrong list for Eclipse forms, please let me know)
I have been plowing through Eclipse forms as I thought it might be fun and
useful. I got to the Expandable Composite control, which is documented
Eclipse as an example like this:
ExpandableComposite ec = toolkit.createExpandableComposite(form.getBody(),
ExpandableComposite.TREE_NODE|
ExpandableComposite.CLIENT_INDENT);
ec.setText("Expandable Composite title");
String ctext = "We will now create a somewhat long text so that "+
"we can use it as content for the expandable composite. "+
"Expandable composite is used to hide or show the text using the "+
"toggle control";
Label client = toolkit.createLabel(ec, ctext, SWT.WRAP);
ec.setClient(client);
ec.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
form.reflow(true);
}
});
Trouble is, the method form.reflow(boolean) apparently doesn't exist
(anymore?). And if I comment it out, the twisty for the control toggles
nicely but the text never shows up. How is this supposed to be done? If
there is some up to date documents or demos, that would be great (though I
haven't found much).
TIA, Ric
|
|
|
Re: Form.reflow() [message #334231 is a reply to message #334223] |
Tue, 27 January 2009 16:29   |
Eclipse User |
|
|
|
Originally posted by: riwright.adobe.com
So the answer, if anyone else is curious, is form.layout(). Or, at least,
that produces the behaviour I expected. Is that correct?
Should questions about the org.eclipse.ui.forms package be directed here or
the SWT mailing list?
Ric
On 1/26/09 5:08 PM, in article C5A39E9C.12B03%riwright@adobe.com, "Ric
Wright" <riwright@adobe.com> wrote:
> (If this is the wrong list for Eclipse forms, please let me know)
>
> I have been plowing through Eclipse forms as I thought it might be fun and
> useful. I got to the Expandable Composite control, which is documented
> Eclipse as an example like this:
>
> ExpandableComposite ec = toolkit.createExpandableComposite(form.getBody(),
> ExpandableComposite.TREE_NODE|
> ExpandableComposite.CLIENT_INDENT);
> ec.setText("Expandable Composite title");
> String ctext = "We will now create a somewhat long text so that "+
> "we can use it as content for the expandable composite. "+
> "Expandable composite is used to hide or show the text using the "+
> "toggle control";
> Label client = toolkit.createLabel(ec, ctext, SWT.WRAP);
> ec.setClient(client);
> ec.addExpansionListener(new ExpansionAdapter() {
> public void expansionStateChanged(ExpansionEvent e) {
> form.reflow(true);
> }
> });
>
> Trouble is, the method form.reflow(boolean) apparently doesn't exist
> (anymore?). And if I comment it out, the twisty for the control toggles
> nicely but the text never shows up. How is this supposed to be done? If
> there is some up to date documents or demos, that would be great (though I
> haven't found much).
>
> TIA, Ric
>
|
|
|
Re: Form.reflow() [message #334235 is a reply to message #334231] |
Wed, 28 January 2009 09:25   |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 1/27/2009 4:29 PM, Ric Wright wrote:
> So the answer, if anyone else is curious, is form.layout(). Or, at least,
> that produces the behaviour I expected. Is that correct?
>
> Should questions about the org.eclipse.ui.forms package be directed here or
> the SWT mailing list?
The Forms API is a layer above SWT, so questions belong here (likewise
for JFace questions).
By the way, the reflow(boolean) method is on ManagedForm (IManagedForm),
not ScrolledForm. Still, I've written quite a bit of forms UIs in the
past 2.5 years and don't recall ever having to explicitly call that
method. Are you sure you're not doing something wrong?
Eric
> On 1/26/09 5:08 PM, in article C5A39E9C.12B03%riwright@adobe.com, "Ric
> Wright"<riwright@adobe.com> wrote:
>
>> (If this is the wrong list for Eclipse forms, please let me know)
>>
>> I have been plowing through Eclipse forms as I thought it might be fun and
>> useful. I got to the Expandable Composite control, which is documented
>> Eclipse as an example like this:
>>
>> ExpandableComposite ec = toolkit.createExpandableComposite(form.getBody(),
>> ExpandableComposite.TREE_NODE|
>> ExpandableComposite.CLIENT_INDENT);
>> ec.setText("Expandable Composite title");
>> String ctext = "We will now create a somewhat long text so that "+
>> "we can use it as content for the expandable composite. "+
>> "Expandable composite is used to hide or show the text using the "+
>> "toggle control";
>> Label client = toolkit.createLabel(ec, ctext, SWT.WRAP);
>> ec.setClient(client);
>> ec.addExpansionListener(new ExpansionAdapter() {
>> public void expansionStateChanged(ExpansionEvent e) {
>> form.reflow(true);
>> }
>> });
>>
>> Trouble is, the method form.reflow(boolean) apparently doesn't exist
>> (anymore?). And if I comment it out, the twisty for the control toggles
>> nicely but the text never shows up. How is this supposed to be done? If
>> there is some up to date documents or demos, that would be great (though I
>> haven't found much).
>>
>> TIA, Ric
>>
>
|
|
|
Re: Form.reflow() [message #334403 is a reply to message #334235] |
Fri, 06 February 2009 18:19  |
Eclipse User |
|
|
|
Originally posted by: riwright.adobe.com
Ah, I see. Thanks for the tip.
Ric
On 1/28/09 6:25 AM, in article glppsi$3uc$1@build.eclipse.org, "Eric Rizzo"
<eclipse-news@rizzoweb.com> wrote:
> On 1/27/2009 4:29 PM, Ric Wright wrote:
>> So the answer, if anyone else is curious, is form.layout(). Or, at least,
>> that produces the behaviour I expected. Is that correct?
>>
>> Should questions about the org.eclipse.ui.forms package be directed here or
>> the SWT mailing list?
>
> The Forms API is a layer above SWT, so questions belong here (likewise
> for JFace questions).
>
> By the way, the reflow(boolean) method is on ManagedForm (IManagedForm),
> not ScrolledForm. Still, I've written quite a bit of forms UIs in the
> past 2.5 years and don't recall ever having to explicitly call that
> method. Are you sure you're not doing something wrong?
>
> Eric
>
>
>> On 1/26/09 5:08 PM, in article C5A39E9C.12B03%riwright@adobe.com, "Ric
>> Wright"<riwright@adobe.com> wrote:
>>
>>> (If this is the wrong list for Eclipse forms, please let me know)
>>>
>>> I have been plowing through Eclipse forms as I thought it might be fun and
>>> useful. I got to the Expandable Composite control, which is documented
>>> Eclipse as an example like this:
>>>
>>> ExpandableComposite ec = toolkit.createExpandableComposite(form.getBody(),
>>> ExpandableComposite.TREE_NODE|
>>> ExpandableComposite.CLIENT_INDENT);
>>> ec.setText("Expandable Composite title");
>>> String ctext = "We will now create a somewhat long text so that "+
>>> "we can use it as content for the expandable composite. "+
>>> "Expandable composite is used to hide or show the text using the "+
>>> "toggle control";
>>> Label client = toolkit.createLabel(ec, ctext, SWT.WRAP);
>>> ec.setClient(client);
>>> ec.addExpansionListener(new ExpansionAdapter() {
>>> public void expansionStateChanged(ExpansionEvent e) {
>>> form.reflow(true);
>>> }
>>> });
>>>
>>> Trouble is, the method form.reflow(boolean) apparently doesn't exist
>>> (anymore?). And if I comment it out, the twisty for the control toggles
>>> nicely but the text never shows up. How is this supposed to be done? If
>>> there is some up to date documents or demos, that would be great (though I
>>> haven't found much).
>>>
>>> TIA, Ric
>>>
>>
>
|
|
|
Goto Forum:
Current Time: Sat Mar 15 01:35:43 EDT 2025
Powered by FUDForum. Page generated in 0.02522 seconds
|