Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Form.reflow()
Form.reflow() [message #334223] Tue, 27 January 2009 01:08 Go to next message
Eclipse UserFriend
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 21:29 Go to previous messageGo to next message
Eclipse UserFriend
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 14:25 Go to previous messageGo to next message
Eclipse UserFriend
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 23:19 Go to previous message
Eclipse UserFriend
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
>>>
>>
>
Previous Topic:[p2] Can i somehow "reset" p2?
Next Topic:Print multiple files at once
Goto Forum:
  


Current Time: Thu Apr 25 22:49:14 GMT 2024

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

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

Back to the top