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

hiCreateHorizontalBoxLayout

hiCreateHorizontalBoxLayout( 
s_name 
[ ?items l_items ] 
[ ?frame g_frame ] 
[ ?margins l_margins ] 
[ ?spacing g_spacing ] 
[ ?horiz_align g_horizAlign ] 
[ ?vert_align g_vertAlign ]
[ ?enabled g_enabled ]
[ ?invisible g_invisible ]
[ ?scrollable g_scrollable ]
) 
=> r_hiLayout

Description

Creates a horizontal box layout by specifying the margins, spacing, and alignment.

Arguments

s_name

The symbol name of the hiLayout.

?items l_items

The list of fields, hiLayouts, and spacer items contained within hiLayout.

Each entry in the items list can be a field or hiLayout, a list containing the field or hiLayout followed by the optional field controls, or a list containing the spacer items.

The optional field controls are:

  • 'stretch x_stretch_factor: Stretchiness compared with other fields or layouts in the direction of the box layout. The default value is 0.
  • 'horiz_align s_horiz_alignment: The s_horiz_alignment can be set to 'none, 'left, 'right, 'center, or 'justify (for text).
  • 'vert_align x_vert_alignment: The s_vert_alignment can be set to 'none, 'top, 'bottom, or 'center.

The spacer items are:

  • 'spacer_item x_size: Specifies the additional fixed-size space between two items.
  • 'stretch_item x_stretch_factor: Specifies the additional stretchy-space with minimum size of 0 between two items.

?frame g_frame

It accepts any of the following values:

  • nil: (Default) For an unframed layout.
  • t: For an untitled frame.
  • t_title: For a framed layout with a title.

?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.

?spacing g_spacing

  

Specifies the integer value to apply horizontal spacing. If nil is specified then the default spacing is applied, which is inherited from its parent hiLayout or from the style.

?horiz_align g_horizAlign

  

Specifies the horizontal alignment and can be set to 'none, 'left, 'center, 'right, or 'justify. 'justify is specifically used only for text.

Default value: 'none

?vert_align g_vertAlign

  

Specifies the vertical alignment and can be set to 'none, 'top, 'center, or 'bottom.

Default value: 'none

?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

  

If set to t, 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 defstruct for the horizontal box hiLayout and can be placed in an hiLayout form, scroll region, or tab page.

Examples

Creates a horizontal box layout using the default margins, spacing, and alignment. It contains three text input fields for the first, middle, and last names with a frame title, Enter Full Name.

MyNameLayout = hiCreateHorizontalBoxLayout( 'MyNameLayout ?frame "Enter Full Name" ?items list(
    hiCreateStringField( ?name 'MyFirstName ?prompt "First" )
    hiCreateStringField( ?name 'MyMiddleName ?prompt "Middle" )
    hiCreateStringField( ?name 'MyLastName ?prompt "Last" ) ) )
procedure(ExHorizontalBox()
  let((hbox)
    hbox=hiCreateHorizontalBoxLayout(
      'hbox
      ?items
        list(
          hiCreateBooleanButton(
            ?name 'enable
            ?buttonText "Enable"
          )
          list(
            hiCreateStringField(
              ?name 'lib
              ?prompt "Lib"
            )
            'stretch 1
          )
          list(
            hiCreateStringField(
              ?name 'cell
              ?prompt "Cell"
            )
            'stretch 1
          )
          list(
            hiCreateStringField(
              ?name 'view
              ?prompt "View"
            )
            'stretch 1
          )
        )
    )
    hiCreateLayoutForm(
      'ExHorizBox
      "Horizontal Box"
      hbox
    )
    hiDisplayForm(ExHorizBox)
  )
)

Related Topics

hiLayout Form Functions


Return to top
 ⠀
X