Tech Tip: Open a project form using dynamic form
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac & Win
Published On: August 9, 2018
Here is a utility method to open a project form through a dynamic form:
// ----------------------------------------------------------------- // Name: OPEN_PROJ_FORM_IN_DYNAMIC_FORM // Description: Method will create a form with a Subform Object // and display project specified. // // Input Parameters: // $1 (TEXT) - Project Form name // ------------------------------------------------------------------ C_TEXT($1;$formName) C_LONGINT($width;$height) C_OBJECT($page;$subF;$form) If (Count parameters=1) $formName:=$1 FORM GET PROPERTIES($formName;$width;$height) $subF:=New object("type";"subform";"left";0;"top";0;"width";$width \ ;"height";$height;"detailForm";$formName) $page:=New object("objects";new object("subF";$subF)) $form:=New object("pages";New collection(Null;$page) \ ;"windowTitle";$formName) $window:=Open form window($form) DIALOG($form) CLOSE WINDOW($window) End if |
Here is example of a form in a database called FormSample:
Calling the method as the following:
OPEN_PROJ_FORM_IN_DYNAMIC_FORM ("FormSample") |
Dynamic form will be created as the following:
See Also: