## Frame

### Description

The Frame class implements a frame or group box in which you can create other controls as children. This is typically used in dialogs to group together a set of controls. For example, a set of radio buttons defined in a Frame object form a single group in which only one radio button can be selected at a time; a different set of radio buttons in a different Frame object will form a separate, independent group.

You can also use a Frame to contain a set of controls, such as Buttons or ToolButtons, which you want to move together on the window (for example, so they act as a toolbar which can be positioned along the top or bottom of the window).

Whether the group box title (`caption` property) is shown depends on the `style` property. If `style` is 0, the caption is shown. If `style` is 1, it is not.

If you want to display geometric shapes and draw text on the frame, you can use the `Draw` method.

### Example

         ’DEMO_Frame;DEMO
    [1]   © Sample function demonstrating use of the Frame object
    [2]   DEMO„'Œ' ŒNEW 'Dialog' ª DEMO.scale„1 ª DEMO.size„18 24
    [3]   DEMO.title„'Frame Example'
    [4]   © Create a frame with a caption and some radio buttons
    [5]   DEMO.Frame1.New 'Frame' ª DEMO.Frame1.where„5 1 8 22
    [6]   DEMO.Frame1.caption„'Radio buttons'
    [7]   DEMO.Frame1.R1.New 'Radio'
    [8]   DEMO.Frame1.R1.caption„'Option 1' ª DEMO.Frame1.R1.where„1.5 1 2 20
    [9]   DEMO.Frame1.R2.New 'Radio'
    [10]  DEMO.Frame1.R2.caption„'Option 2' ª DEMO.Frame1.R2.where„3.5 1 2 20
    [11]  DEMO.Frame1.R3.New 'Radio'
    [12]  DEMO.Frame1.R3.caption„'Option 3' ª DEMO.Frame1.R3.where„5.5 1 2 20
    [13]  © Create a second frame with no caption, and some action buttons
    [14]  © which will align it to top or bottom of window
    [15]  DEMO.Frame2.New 'Frame'
    [16]  DEMO.Frame2.style„1 ª DEMO.Frame2.size„4 0 ª DEMO.Frame2.align„1
    [17]  DEMO.Frame2.B1.New 'Button'
    [18]  DEMO.Frame2.B1.caption„'Top' ª DEMO.Frame2.B1.where„1 1 2 10
    [19]  DEMO.Frame2.B1.onClick„"DEMO.Frame2.align„1"
    [20]  DEMO.Frame2.B2.New 'Button'
    [21]  DEMO.Frame2.B2.caption„'Bottom' ª DEMO.Frame2.B2.where„1 12 2 10
    [22]  DEMO.Frame2.B2.onClick„"DEMO.Frame2.align„3"
    [23]  ©
    [24]  © Wait for the user to close the window
    [25]  0 0½ŒWE DEMO
         ’

### Properties

align anchors aquaadjust autodraw caption children class color data doublebuffered dragsource droptarget enabled events extent font handle maxsize methods minsize name opened order pointer properties scale self size sourceformats style tabstop targetformats tie units visible where winptr

### Methods

Click Clienttoscreen Close Create Delete Draw Focus Hide New Open Paint Resize Screentoclient Send Set Show Trigger

### Callbacks

onClick onClose onDblClick onDestroy onDragDrop onDragEnd onDragEnter onDragLeave onDragOver onDragStart onFocus onHide onKeyDown onKeyPress onKeyUp onMouseDown onMouseMove onMouseUp onOpen onSend onShow onUnFocus

Topic: APLX Help : System Classes : List of Classes : Frame

[ Previous | Next | Contents | Index ]