hiCreateDisclosureButton
hiCreateDisclosureButton(?names_name[?callbackg_callback] [?valueg_value] [?defValueg_defValue] [?helpS_help] [?enabledg_enabled] [?invisibleg_invisible] [?onFieldsl_onFields] [?offFieldsl_offFields] ) =>r_fieldHandle
Description
A disclosure button is a button without a label used for displaying the additional information or functionality associated with another widget.
By default, a disclosure button is displayed in the closed position, pointing down [v]. When you click a button, it points up [^] and triggers the ?callback, which is usually used to display additional fields.
This function checks for duplicate fields in the onFields and offFields lists. In case a field appears in both lists, it gets removed from both lists and a warning message is displayed.
In addition, whenever a field is added to a form after the form is displayed, the form code checks if the field is listed in any disclosure field’s disclosureList. If it finds the field in any one of the lists, the code sets the visibility of the field appropriately prior to adding the field to the form.
Arguments
Values Returned
Examples
(defun make_font_selection_form ( name use_disclosure_button ) (let ((attachment (bor hicLeftPositionSet hicTopPositionSet)) (font_disclosure_args ;; args for hiCreateDisclosure... below
(list '?name 'trFont '?value nil
'?onFields '(cmbSt cmbHt cmbJt cmbES)
'?offFields '(cmbSm)
'?callback (lambda (field scope value)
(hiReattachField
scope 'trCo
(list (list 5 (if value 170 44)) 20:20 10)
(bor hicLeftPositionSet hicTopPositionSet)))))
(fields
(list
(list (hiCreateComboField
?name 'cmbSm ?prompt " " ?items '("Stick") ?value "Stick")
110:10 160:25 10)
(list (hiCreateComboField
?name 'cmbSt ?prompt " Style" ?items '("Stick")
?value "Stick" ?invisible t) 50:40 220:25 70)
(list (hiCreateComboField
?name 'cmbHt ?prompt " Height" ?items '("0.0625")
?value "0.0625" ?invisible t) 50:70 220:25 70)
(list (hiCreateComboField
?name 'cmbJt ?prompt "Justification" ?items '("Lower Center")
?value "Lower Center" ?invisible t) 50:100 220:25 70)
(list (hiCreateComboField
?name 'cmbES ?prompt " Entry Style" ?items '("Fixed Offset")
?value "Fixed Offset" ?invisible t) 50:130 220:25 70))))
(unless use_disclosure_button
font_disclosure_args= (append font_disclosure_args
'(?labelText "Font (trFont)")))
fields= (cons (list
(apply (if use_disclosure_button 'hiCreateDisclosureButton
'hiCreateDisclosureTriangle) font_disclosure_args)
5:14 20:20 10)
fields)
(hiCreateAppForm ?name name ?formTitle (sprintf nil "Font Selection (%s)" name)
?buttonLayout 'OKCancel ?dontBlock t ?initialSize 300:120 ?fields fields
?attachmentList (list attachment attachment attachment attachment
attachment attachment attachment))))
(hiDisplayForm (make_font_selection_form (gensym 'form) t) 200:100)
Related Topics
Return to top