Embeds an entire OI form in the panel control.
rv = Send_Message(Ctrl, "OLE.SetForm", Handle, FitWidth, FitHeight) |
Parameter | Description |
---|---|
Handle | The windows handle to the form to embed. |
FitWidth | Flag determining whether to use the form's width or the SRP Panel's width |
FitHeight | Flag determining whether to use the form's height or the SRP Panel's height |
The SetForm method embeds an OI form inside the scrollable SRP Panel Control. Only one form can be set at a time.
The Handle parameter is the windows handle of the form as returned from the HANDLE property.
The FitWidth and FitHeight parameters define the resizing behavior of the form. By default, the form's SIZE dimensions are used. So, if the form is bigger than the SRP Panel Control, then scroll bars appear which allow the user to scroll the form as desired. However, if you want the form to be autosized to fit the dimensions of the SRP Panel Control, set eiter of these flags to ture. For example, if you set FitWidth to 1, then there will never be a horizontal scroll bar because the width of the form will always equal the width of the SRP Panel Control.
You can use SetForm or AddCtrls, but never both. Calling one will undo the other. For example, called SetForm will remove all individual controls you added via AddCtrls.
// Start the window we wish to embed, then add it to the panel, autosizing the width NewWindow = Start_Window("MY_WINDOW") Handle = Get_Property(NewWindow, "HANDLE") Send_Message(@Window:".OLE_PANEL", "OLE.SetForm", Handle, 1, 0) |