Programming Guide : Creating Dynamic Frames : How You Can Change Field and Frame Appearance and Behavior : How You Can Change Frame Modes
 
Share this page          
How You Can Change Frame Modes
When creating a multipurpose application that uses a single frame for more than one task (for example, some users update information while others only examine it), you can use frame modes to change the bias for several or all fields simultaneously.
A frame mode is a name given to a particular set of field and menu biases. For example, the Read mode for a frame might set all fields on the frame to have a bias of Visible, allowing the user to see the fields but not select them.
Frame modes let you switch the biases for many fields and menu items with a single statement. When you set the frame to a particular mode, OpenROAD sets the biases for all the fields and menu items in the frame to the correct bias for that mode.
Every OpenROAD frame has six frame modes, which are described in Frame Modes. When you create the frame in OpenROAD Workbench, you specify the initial mode for the frame on the frame's Property Inspector. Then, in the Frame Editor, you can use the Bias menu to set the initial bias of each field on the form for all six frame modes.
OpenROAD provides default biases for all six modes. All but Read mode default to a bias of Changeable. Read mode defaults to a bias of Landable. There is no inherent link between a mode's name and its operations. You can make fields Changeable in Read mode or Landable in Update mode.
The frame mode changes only when explicitly changed in the 4GL code. It is not affected directly by user actions.
You can also change the bias of an individual field for a specific mode. For example, you can use the UpdateBias attribute (a mode-bias attribute) to set the bias of a field to Visible when the frame is in Update mode. After setting the UpdateBias attribute, the next time you set the frame to Update mode, OpenROAD sets the bias of that field to Visible.