// Remove selected button
// attach the left edge to the opposite side
// with a 0 pixel offset and at 73% of the window width
-ap ewc_btnRemoveSelectedObjects "left" 0 73
// attach at top edge with a 2 pixel offset
-af ewc_btnRemoveSelectedObjects "top" 2
// attach at right edge with a 5 pixel offset
-af ewc_btnRemoveSelectedObjects "right" 5
ewc_formMainLayout;
Both work equally well. However, an advantage to using the control
names is that you will know exactly what control you are positioning
simply by referring to the name. If you choose to use the variable
method to position controls, be sure to meticulously comment.
6.3.7 The scrollLayout Control
This is the control that will enable a scroll bar when any of the win-
dow’s children are not visible. By default a window does not scroll if
a control is not in view. You must create a scrollLayout to enable this
feature in a window.
// Scroll Layout
string $scroll1 = `scrollLayout
-horizontalScrollBarThickness 0
-childResizable 1
ewc_scrollFrameHolder`;
n
-horizontalScrollBarThickness: Sets the size of the horizon-
tal bar. (There is a similar flag for the vertical bar; see the MEL
documentation for more information.) To turn it off, set its size
to 0.
n
-childResizable: Enabling this flag will force the children (spe-
cifically the underlying layouts) to scale with the scrollLayout.
Similar to the buttons added previously, the scrollLayout must have
its position edited within the formLayout.
// Main scroll layout
-ac $scroll1 "top" 2 $b1
Scene Management with ewc_extendedLayerManager
217
Chapter 6

Get Professional MEL Solutions for Production now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.