Popup Rectangle (PopupRect)
Defines the position and size of a rectangle to use as an anchor for a popup form, in
character cells or pixels. The default value is 0,0,0,0
.
PopupRect=
"
xpos{px
},
ypos{px
},
xsize{px
},
ysize{px
} "
Value |
Meaning |
---|---|
xpos xpos |
Starting position of the popup window,
expressed as |
xsize xsize |
Dimensions of the popup rectangle; in
character cells by default, or in pixels if xsize and
ysize can be |
Usage
Dynamic? |
Yes |
Supported in Grid? |
No |
Dependencies: |
None |
Description
The PopupRect property provides precise control for positioning a popup form. It can only be set in ProcScript, using $fieldproperties.
By default, a popup form is anchored to the bottom left corner of a field and drops down to the right. The anchor corner and direction can be changed with the form's Position property, but the popup window always appears outside the widget boundaries. This not always fine-grained enough. You may want to overlay the contents of a field, or display a popup inside a large field.
When PopupRect is defined, it is used as an anchor for the popup form, instead of the widget boundaries. The top left corner of the rectangle can be inside or outside the widget.
The PopupRect property affects all popup forms anchored to a field. You can first instantiate a popup form without the PopupRect property and then set the property to instantiate another popup. If both popup instances remain open, the anchor point of the first popup changes when the size or position of the anchor field changes. This triggers Uniface to reevaluate the position of all popup instances and use the current value of the PopupRect property for all instances, even when the different popups were instantiated with a different value.
Setting in ProcScript
The following ProcScript sets the PopupRect property for field WID, and displays a form in a drop-down window.
;Detail trigger of WID field newinstance "POPUPFRM", "Popup", "windowtype=popup" $fieldproperties(FLD1) = "popuprect=5,1,100px,10px" activate "Popup"
Applies To
All widgets except the Grid widget.
- ucheckbox (CheckBox)
- ucolorbox (ColorBox)
- ucolorlist (ColorList)
- ucombobox (Combo Box)
- CommandButton
- DropTarget
- udropdownlist (DropDownList)
- ucontainer (FormContainer)
- EditBox
- uhyperlink (Hyperlink)
- uhtml (HTML Widget)
- ulistbox (ListBox )
- umap (Map)
- umeter (Meter)
- (umonthcalendar) MonthCalendar
- uOcxContainer (OcxContainer)
- uOleContainer (OleContainer)
- uoutputbox (OutputBox)
- upicture (Picture)
- uradiogroup (RadioGroup)
- urtfeditbox (RichEditBox)
- uslider (Slider)
- uspinbutton (SpinButton)
- utab (Tab)
- utabex (TabEx)
- utree (Tree)