RESIZE Attribute in Dialog Box¶
This feature included as of FWD v4.0.0. See #4247.
The subject of this 4GL language extension is the RESIZE attribute for DIALOG-BOX widget. The semantics of the introduced attribute is the same as the attribute RESIZE of WINDOW widget. When the attribute is set to true the target DIALOG-BOX window becomes user resizable, i.e. the window can be resized with a mouse. The default value of the attribute is false, and so the behavior defaults to the legacy 4GL.
Similarly as with the WINDOW widget, when the resizable DIALOG-BOX is resized a WINDOW-RESIZED event gets triggered for the target frame. See the example below how the feature is used.
The attribute is only assignable before the DIALOG-BOX has been realized.
Example:
default-window:visible = true. define button b label "Close". define frame f "This frame will fill the window when the dialog is resized." b with view-as dialog-box size 60 by 15. frame f:resize = true. enable all with frame f. on window-resized of frame f do: message "Dialog resized". run layout. end. run layout. procedure layout: b:column = frame f:width / 2 - b:width in frame f / 2. b:row = frame f:height / 2 - b:height in frame f / 2. end. wait-for close of this-procedure or choose of b in frame f.
© 2019 Golden Code Development Corporation. ALL RIGHTS RESERVED.