Ec.addexpansionlistener (New Expansionadapter () {
public void expansionstatechanged (Expansionevent e) {
Form.reflow (TRUE);
}
});
L This control has many styles, Tree_node makes the control have the expand and shrink function of the tree node, and Twistie makes the control have the Triangle arrow style
L expanded makes initial expansion display
L Client_indent makes the CLIENT content indent
L Expandablecomposite is rendered as activating control and caption, while the contents that can be expanded and shrunk are called client
L Client must be expandable composite (the previous example is a Label control)
L finally need to add expansion listener when the state changes, the Reflow Form (that is, reposition and update the scroll bar based on the new size of the control)
L The following is the result of the operation of the previous example:
(2) Section
The most common custom control in the Eclipse form is the section (visible everywhere in the PDE)
L section extension Expandablecomposite, but has the following new features:
n There is a separate control under the heading
n You can have a descriptive text below the separator control
L The following code snippet is an example of using a section, the code is not much different from the expandablecomposite, and here is the Twistie style:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.