Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The AddNamedForm method embeds an OI form inside the scrollable SRP Panel Control. Unlike the SetForm method, which only allows one form to be embedded, you can call this method over and over again to add as many forms as you want. All you have to do is include a unique name of the form so you can identify it later.

...

To show a form you have added, use the ActiveForm 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 turetrue. 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.

...

Code Block
// Add two windows to the form, then show the second one
NewWindow = Start_Window("MY_FIRST_WINDOW") 
Handle = Get_Property(NewWindow, "HANDLE") 
Send_Message(@Window:".OLE_PANEL", "OLE.AddNameForm", Handle, "FORM_A", 1, 0)
NewWindow = Start_Window("MY_SECOND_WINDOW") 
Handle = Get_Property(NewWindow, "HANDLE") 
Send_Message(@Window:".OLE_PANEL", "OLE.AddNameForm", Handle, "FORM_B", 1, 0)
Set_Property(@Window:".OLE_PANEL", "OLE.ActiveForm", "FORM_B")

See Also

ActiveForm, RemoveAllNamedForms, RemoveNamedForm