hiDisplayForm
hiDisplayForm(g_form[l_location] ) =>t / nil
Description
Displays a form. Do not use hiDisplayForm for displaying options forms. You can also use this function to bring a form to the top of the screen if the form is covered by other windows.
Arguments
If you specify -1:-1 for the l_location argument, this causes the form to be displayed centered under the cursor.
Values Returned
If you set the g_dontBlock argument of the hiCreateAppForm function set to t, a call to hiDisplayForm() immediately return t.
Examples
;****************************************
;Sample form and fields
;****************************************
; Create string entry for the form.
procedure( myformDefineFields()
strfldglb = hiCreateStringField(
?name `strfldglb
?prompt "sample string field" ;;; FIELD1, a string type
?defValue "initial string"
?callback "my_strfldglb_cb()"
?editable t
)
; Create a Boolean button for the form.
boolfldglb = hiCreateBooleanButton(
?name `boolfldglb
?buttonText "sample boolean field" ;;; FIELD2, a boolean type
?defValue t
?callback "my_boolfldglb_cb()"
)
list( strfldglb boolfldglb )
)
; Generate the form
procedure( myformcreateform()
if( !boundp(`myformglb) || (myformglb == nil)
then
myformglb = hiCreateAppForm(
?name `myformglb
?fields myformDefineFields()
?formTitle "My first Form"
?callback "myformglb_cb()"
?buttonLayout `OKCancel
)
)
myformglb
)
; Display the form
procedure( myformdisplayform()
myformcreateform() ;;; Creation and Display are separate
hiDisplayForm(`myformglb)
)
; Check the current state of the form
hiIsFormDisplayed(myformglb) =>nil
myformdisplayform()
hiIsFormDisplayed(myformglb)
=>t
Related Topics
Return to top