Locate_Mode - BasicPanel
Provides several flexible methods for auto positioning container panels in your program
Type: Property
Access: Read/Write
Data Type: Integer
Parameters: None
Syntax
Property Integer Locate_Mode
| Access Type | Syntax |
|---|---|
| Read Access: | Get Locate_Mode to IntegerVariable |
| Write Access: | Set Locate_Mode to IntegerVariable/Value |
Description
The Locate_Mode property provides several flexible methods for auto positioning container panels in your program. The following modes are supported:
| Constant | Meaning |
|---|---|
| NO_LOCATE | No auto-location is performed. The object must be manually located by using the set location message. |
| POPUP_LOCATE | This causes the object to locate itself relative to the object (and item) that invoked it. It is ideal for locating popup modal objects (like selection-lists). The position at which this object pops up depends on the values of its column_offset and row_offset properties. |
| CENTER_ON_SCREEN | This causes the container to appear in the center of the screen (first monitor in the case of multiple monitors). |
| CENTER_ON_PANEL | This causes the container to centered within the current main program panel. |
| CENTER_ON_PARENT | This causes the container to appear in the center of its parent container. |
| SMART_LOCATE | This mode "just does the right thing". This message will cause the object to apply the best locating strategy for current conditions. If the object is a modal popup (modal_state is true) and there is an invoking object it will locate relative to the invoking object (popup_locate), else, if the object already has been assigned a location it will use that location. else, if main-panel exists it will center within that panel (center_on_panel), else, it will center itself on the screen (center_on_screen). All panels default to this mode. This causes modal popup panels to locate relative to their parent and modeless panels to appeared centered unless explicitly located. |
Default is SMART_LOCATE.
| Col 1 | Col 2 |
|---|---|
| Note: | The Locate_Mode property is not intended for use with MDI dialogs (View or dbView objects). While the class understands the message, it will not do anything useful. Use DoCenterMdiDialog instead. |