Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiCreateStackedLayout

hiCreateStackedLayout( 
s_name 
[ ?items l_items ] 
[ ?frame g_frame ] 
[ ?margins l_margins ] 
[ ?currentIndex g_currentIndex ]
[ ?enabled g_enabled ]
[ ?invisible g_invisible ]
[ ?scrollable g_scrollable ]
) 
=> r_hiLayout

Description

Creates a stacked layout. A stacked layout only shows one of the fields at a time, which can be set using the currentIndex argument of the layout.

Arguments

s_name

The symbol name for the layout.

?items l_items

The list of fields and layouts contained within the layout.

?frame g_frame

Any of the following values:

  • nil: (Default) For no frame.
  • t: For an untitled frame.
  • t_title: For a titled frame.

?margins l_margins

  

Accepts integer values or nil for 'left, 'top, 'right, and 'bottom (in the same sequence) used to apply margins. If nil is specified, then the default margins are applied.

?currentIndex g_currentIndex

  

Specifies an integer value other than nil that specifies the initial index to display.

Default value: 0

?enabled g_enabled

  

Specifies whether the fields in the layout are enabled. The default value is t.

?invisible g_invisible

  

Specifies whether the layout and the fields within are invisible. The default value is nil.

?scrollable g_scrollable

  

Adds a scroll bar in the layout if the content is large and cannot be accommodated. The default value is nil.

Value Returned

r_hiLayout

The hiLayout defstruct for the stacked layout.

Examples

Creates a stacked layout destruct with MyStringField as the first field in the stack, keeping the side margins as the default with the top margin as 5 and the bottom margin as 8.

If MyForm contains a grid layout that was created as follows:

MyStackedLayout = hiCreateStackedLayout( 'MyStackedLayout ?margins list( nil 5 nil 8 ) ?items list( MyStringField MyReportField MySubLayout ) )

Specifies the field options of the Stacked Layout form.

procedure(ExStacked()
  let((stacked)
    stacked=hiCreateStackedLayout(
      'stacked
      ?items
        list(
          hiCreateBooleanButton(
            ?name 'enable
            ?buttonText "Enable"
          )
          hiCreateStringField(
            ?name 'lib
            ?prompt "Lib"
          )
          hiCreateStringField(
            ?name 'cell
            ?prompt "Cell"
          )
          hiCreateStringField(
            ?name 'view
            ?prompt "View"
          )
        )
      ?frame "Stacked Layout"
    )
    hiCreateLayoutForm(
      'ExStackedForm
      "Stacked Layout"
      hiCreateVerticalBoxLayout(
        'vbox
        ?items
          list(
            ; spin box is to allow the selection of which field
            ; to display in the stacked layout
            hiCreateSpinBox(
              ?name 'stackSelector
              ?prompt "Select Stack"
              ?range 0:3
              ?callback "ExStackedForm->stacked->currentIndex=ExStackedForm->stackSelector->value"
            )
            stacked
          )
      )
    )
    hiDisplayForm(ExStackedForm)
  )
)

Related Topics

hiLayout Form Functions


Return to top
 ⠀
X