• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How to show/hide multiple fields in a form?

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 2555
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to show/hide multiple fields in a form?

Quesar
Quesar over 5 years ago

Hi,

In the Virtuoso XStream Out GUI for example, the Layer Map, Object Map, and Log File sections are user-clickable expandable/collapsible sections which show/hide multiple form fields. I'd like to know how to do this, or which function(s) are responsible for this behaviour.

I have checked the documentation but I could not find any clues there.

Any help would be appreciated. Thanks.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    That UI isn't actually implemented in SKILL, but the same capability is available using "progressive disclosure" widgets - in particular the hiCreateDisclosureTriangle function (there's also the similar hiCreateDisclosureButton too). An example of using these (as well as all other hi fields) can be found in this excellent article by one of my colleagues: Worked example using all available SKILL UI fields (they're on the third tab).

    If these are used together with the "layout forms" (hiCreateLayoutForm etc) then the space also collapses. I threw together a simple example shown below:

    /***************************************************************
    *                                                              *
    *                   CCFcreateExampleLayForm()                  *
    *                                                              *
    *               You guessed it. Creates the form               *
    *                                                              *
    ***************************************************************/
    procedure(CCFcreateExampleLayForm()
        let((field1Label field1Entry field2Label field2Entry extraParams 
            paramLabel minLabel stepLabel maxLabel
            paramEntry minEntry stepEntry maxEntry
            gridLayout)
            field1Label=hiCreateLabel(
                ?name 'field1Label
                ?labelText "First Field"
                ?justification 'right
            )
            field1Entry=hiCreateStringField(
                ?name 'field1Entry
            )
            field2Label=hiCreateLabel(
                ?name 'field2Label
                ?labelText "Second Field"
                ?justification 'right
            )
            field2Entry=hiCreateStringField(
                ?name 'field2Entry
            )
            extraParams=hiCreateDisclosureTriangle(
                ?name 'extraParams
                ?labelText "Extra Parameters"
                ?onFields 
                    list(
                        'paramLabel 'minLabel 'stepLabel 'maxLabel
                        'paramEntry 'minEntry 'stepEntry 'maxEntry
                    )
                )
            paramLabel=hiCreateLabel(
                ?name 'paramLabel
                ?labelText "<b>Parameter</b>"
            )
            minLabel=hiCreateLabel(
                ?name 'minLabel
                ?labelText "<b>Minimum</b>"
            )
            stepLabel=hiCreateLabel(
                ?name 'stepLabel
                ?labelText "<b>Step</b>"
            )
            maxLabel=hiCreateLabel(
                ?name 'maxLabel
                ?labelText "<b>Maximum</b>"
            )
            paramEntry=hiCreateStringField(
                ?name 'paramEntry
            )
            minEntry=hiCreateStringField(
                ?name 'minEntry
            )
            stepEntry=hiCreateStringField(
                ?name 'stepEntry
            )
            maxEntry=hiCreateStringField(
                ?name 'maxEntry
            )
            gridLayout=hiCreateGridLayout(
                'gridLayout
                ?items list(
                    list(field1Label 'horiz_align 'right 'row 0 'col 0)
                    list(field1Entry 'horiz_align 'right 'row 0 'col 1 'col_span -1)
                    list(extraParams 'horiz_align 'left 'row 1 'col 0)
                    list(paramLabel 'horiz_align 'left 'row 2 'col 0)
                    list(minLabel 'horiz_align 'left 'row 2 'col 1)
                    list(stepLabel 'horiz_align 'left 'row 2 'col 2)
                    list(maxLabel 'horiz_align 'left 'row 2 'col 3)
                    list(paramEntry 'horiz_align 'left 'row 3 'col 0)
                    list(minEntry 'horiz_align 'left 'row 3 'col 1)
                    list(stepEntry 'horiz_align 'left 'row 3 'col 2)
                    list(maxEntry 'horiz_align 'left 'row 3 'col 3)
                    list(field2Label 'horiz_align 'right 'row 4 'col 0)
                    list(field2Entry 'horiz_align 'right 'row 4 'col 1 'col_span -1)
                    list('col_stretch 0 1)
                    list('col_stretch 1 1)
                    list('col_stretch 2 1)
                    list('col_stretch 3 1)
                )
            )
            hiCreateLayoutForm(
                'CCFexampleLayForm
                "Example Form"
                ;--------------------------------------------------------
                ; Surrounding vertical box layout is to have a stretchable
                ; item below the layout to absorb all the stretchiness!
                ;--------------------------------------------------------
                hiCreateVerticalBoxLayout(
                    'vbox
                    ?items list(
                        gridLayout
                        list('stretch_item 1)
                    )
                )
            )
            CCFexampleLayForm
        )
    )
    
    /***************************************************************
    *                                                              *
    *                  CCFdisplayExampleLayForm()                  *
    *                                                              *
    *           Create (if needed) and display the form            *
    *                                                              *
    ***************************************************************/
    
    procedure(CCFdisplayExampleLayForm()
        unless(boundp('CCFexampleLayForm)
            CCFcreateExampleLayForm()
        )
        hiDisplayForm(CCFexampleLayForm)
    )
    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Quesar
    Quesar over 5 years ago in reply to Andrew Beckett

    Thanks Andrew! I will take a close look at the link you posted as well as your example above. As always, you're this forum's saviour  Smiley

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information