hiCreateDisclosureTriangle
hiCreateDisclosureTriangle(?names_name[?labelTextt_labelText] [?callbackg_callback] [?valueg_value] [?defValueg_defValue] [?helpS_help] [?enabledg_enabled] [?invisibleg_invisible] [?onFieldsl_onFields] [?offFieldsl_offFields] [ ?persistentg_state] ) =>r_fieldHandle
Description
A disclosure triangle is a low profile widget for displaying the additional information or functionality embedded in a form.
By default, a disclosure triangle is displayed in the closed position, pointing to the right (>). When you click the triangle, it points down (v) and triggers the ?callback, if specified. The ?callback usually displays or hides additional information in the form.
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
The fields specified by ?onFields and ?offFields must have the same parent of the disclosure field. Therefore, these fields should be in the same scroll region, on the same page of a tab-field, or directly placed in the same form.
In addition, if the form is a hiLayout form, then the ?onFields and ?offFields list also includes symbols of layouts. These layouts must have the same parent of the disclosure field.
Values Returned
Examples
rotateLeftBtn = hiCreateFormButton( ?name 'rotateLeftBtn
?buttonText ""
?buttonIcon list("rotate-90-left.png" 24 24)
?invisible nil
) rotateRightBtn = hiCreateFormButton( ?name 'rotateRightBtn
?buttonText ""
?buttonIcon list("rotate-90-right.png" 24 24)
?invisible nil
) flipVerticalBtn = hiCreateFormButton( ?name 'flipVerticalBtn
?buttonText ""
?buttonIcon list("flip-horizontal-axis.png" 24 24)
?invisible nil
) flipHorizontalBtn = hiCreateFormButton( ?name 'flipHorizontalBtn
?buttonText ""
?buttonIcon list("flip-vertical-axis.png" 24 24)
?invisible nil
) myDiscForm = hiCreateLayoutForm( 'myDiscForm "My Disclosure Form" hiCreateVerticalBoxLayout( 'myMainLayout ?items list(
hiCreateGridLayout( 'myGridLayout
?items list(
list( hiCreateDisclosureTriangle( ?name 'trFont
?labelText "Font (trFont)" ?value nil
?onFields '(cmbSt cmbHt cmbJt cmbES iconBtnLabel
cmbStLbl cmbHtLbl cmbJtLbl cmbESLbl
hBoxIconBtn)
?offFields '(cmbSm))
'horiz_align 'left 'row 0 'col 0)
list( hiCreateComboField( ?name 'cmbSm ?prompt " "
?items '("Stick") ?value "Stick")
'horiz_align 'left 'row 0 'col 1)
list( hiCreateLabel( ?name 'cmbStLbl ?labelText "Style"
?invisible t ?justification 'right)
'horiz_align 'right 'row 1 'col 0)
list( hiCreateComboField( ?name 'cmbSt ?prompt " "
?items '("Stick") ?value "Stick" ?invisible t)
'horiz_align 'left 'row 1 'col 1)
list( hiCreateLabel( ?name 'cmbHtLbl ?labelText "Height"
?invisible t ?justification 'right)
'horiz_align 'right 'row 2 'col 0)
list( hiCreateComboField( ?name 'cmbHt ?prompt " "
?items '("0.0625") ?value "0.0625" ?invisible t)
'horiz_align 'left 'row 2 'col 1)
list( hiCreateLabel( ?name 'cmbJtLbl ?invisible t
?labelText "Justification"
?justification 'right)
'horiz_align 'right 'row 3 'col 0)
list( hiCreateComboField( ?name 'cmbJt ?prompt " "
?items '("Lower Center") ?value "Lower Center"
?invisible t)
'horiz_align 'left 'row 3 'col 1)
list( hiCreateLabel( ?name 'cmbESLbl ?invisible t
?labelText "Entry Style"
?justification 'right)
'horiz_align 'right 'row 4 'col 0)
list( hiCreateComboField( ?name 'cmbES ?prompt " "
?items '("Fixed Offset") ?value "Fixed Offset"
?invisible t)
'horiz_align 'left 'row 4 'col 1)
list( hiCreateLabel( ?name 'iconBtnLabel
?labelText "Icon Buttons"
?justification 'right ?invisible t)
'horiz_align 'right 'row 5 'col 0)
list( hiCreateHorizontalBoxLayout('hBoxIconBtn
?items list(rotateLeftBtn rotateRightBtn
flipVerticalBtn flipHorizontalBtn )
?margins '(nil nil nil nil) ?spacing 0 ?invisible t)
'horiz_align 'left 'row 5 'col 1)
list( 'col_stretch 1 1 )
)
)
list( 'stretch_item 1 )
))
?buttonLayout 'OKCancel ?minSize 275:70)
hiDisplayForm( myDiscForm)
Related Topics
Return to top