Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For what you're trying to do (attach the widget to the sides of its parent), it's enough to use the single-argument constructor of <code>FormAttachment</code>. This works:</p> <pre><code>fd_browser.top = new FormAttachment(0); fd_browser.left = new FormAttachment(0); fd_browser.bottom = new FormAttachment(100); fd_browser.right = new FormAttachment(100); </code></pre> <p>What that says is "attach the top edge to the 0% vertical postion of the container," "attach the left edge to the 0% horizontal position," "attach the bottom edge to the 100% vertical position of the container," and "attach the right edge to the 100% position of the container." In other words, the top and left edges will be at the container origin + 0 and the bottom and right edges will be at the container origin + 100% of the container size. It sounds complex in words but I think it's actually very intuitive.</p> <p>Using the two-argument c'tor as your code does, is specifying hard-coded offsets from the container's 0,0 position (450 down and 845 across), which is essentially telling the Browser widget to be fixed size. Offsets in FormLayout are really only useful for setting margins or, um, offsets from edges of the container or other widgets. :-)</p> <p>I'd suggest read the JavaDocs for FormAttachment and FormLayout again - once you "get" it I think it will be easy for you to use. There are also probably some examples on the <a href="http://www.eclipse.org/swt/snippets/" rel="nofollow">SWT Snippets page</a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload