Form and Widget Location Commands

 

The following settings apply to the form and cursor placement. All of the values are optional since there is a default value for each of parameters.

 

NOTE: The unit spacing are float values from 0.0 to 1.0. These are relative to the windows being referenced such that 1.0 is the height and width of the window. The default values are (0.0, 0.0).

 

 

pos_units = <pixel, unit>
(units used for form & cursor placement, "unit" is the default)
form_pos = <name>, <parameter 1>, <parameter 2>

 

 

There are several different methods of positioning a form which gives great flexibility in locating the form.

 

* Position relative to the base window or another form.

 

There can be up to four of these settings which are enough to tie each edge of the form to another object. Two settings are needed to locate the form relative to another object. Additional settings would therefore constrain the height and width of the form using the location of the other objects to determine its size.

 

 

<name>

is used to specify the item upon which the form's placement is based with the following valid values:

base-

position using the base window

screen-

position using the entire screen

disp_fix

position using the display window (fixed)

disp_rel

position using the display window (relative)

<form>

position using the name of any form

 

 

There are two options for anchoring forms to the display window, disp_fix and disp_rel:

 

 

disp_fix

the positioning is always fixed

disp_rel

the positioning is relative to the text area or sidebar placement as set with the Vx.PromptArea and Vx.SideBar resources found in the user's vxconfig file. PromptArea affects the top and bottom constraints, and SideBar affects the right and left constraints.

 

 

For backwards compatibility, disp is the same as disp_fix and is still supported. See the IMPORTANT note below about overconstraining a form.

 

 

<parameter 1>

is used to specify the type of positioning to be used with the following valid values:

BT

bottom of relative object to bottom of this form

TB

top of relative object to bottom of this form

RL

right of relative object to left of this form

LR

left of relative object to right of this form

TT

top of relative object to top of this form

BB

bottom of relative object to bottom of this form

LL

left of relative object to left of this form

RR

right of relative object to right of this form

CTR

 

the form is centered relative to object specified (NOTE: this will override all of the other constraints)

 

 

<parameter 2> is used to specify the offset from the relative object to the form--remember that this can either be in pixels or unit spacing depending on the value of "pos_units".

 

DEFAULT: The default value is to locate the form at the cursor.

 

form_pos = cursor,0.0,0.0

 

0331.gif IMPORTANT: Do not mix disp_rel with the other constraint types when over constraining a form (i.e., specifying right AND left attachments, or top AND bottom attachments). The following two examples illustrate this point:

 

OK (both the top and bottom constraints use disp_rel):
 

disp_rel TT 0.0

disp_rel BB 0.0

disp LL 0.0

 

 

NOT OK (the top is constrained with disp_rel, the bottom with disp):
 

disp_rel TT 0.0
disp BB 0.0
disp LL 0.0
 

 

 

Notice that it is ok to orthogonally mix disp_rel constraints with other constraint types as shown in the first example.

 

* Position relative to the cursor.

 

This option give the ability to locate the form relative to the location of the cursor.

 

 

<name>

= "cursor"

<parameter 1>

= x offset from the cursor

<parameter 2>

= y offset from the cursor

 

 

cur_pos = <loc, fld>, <parameter 1>, <parameter 2>

 

 

This attribute gives the ability to jump the cursor to a specified (x,y) position or to a specific item within a widget on the form. This is available for all of the form positioning types except for positioning the form based upon the location of the cursor.

 

If "loc", parameter 1 = x position, and parameter 2 = y position

 

If "fld", parameter 1 = widget field id, parameter 2 = item id

 

DEFAULT: no cursor jumping

Return to VX CAD/CAM Index