• 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. hiCreateAppForm with scrollbars and attachmentList

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 15079
  • 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

hiCreateAppForm with scrollbars and attachmentList

Aldo2
Aldo2 over 5 years ago

Hello,

I have created an appForm with  the following attachmentList and size:

?attachmentList list(hicLeftPositionSet | hicRightPositionSet ; field 1
                     hicLeftPositionSet | hicRightPositionSet ; field 2
etc.

?initialSize    800:800
?minSize        800:800
?maxSize       1600:800

If I reduce the minimum y-size (?minSize        800:200), scrollbars are not inserted, unless I remove the attachmentList constraints.

Is it possible to have both scrollbars and "hicLeftPositionSet | hicRightPositionSet"? 

Thank you,

Best regards,

Aldo

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    Aldo,

    I don't think so. You should probably use the newer "layout" form capability (hiCreateLayoutForm, with hiCreateGridLayout etc) as this is a much more powerful and simpler way of having a decent geometry manager rather than the older attachment based approach. Here's a simple example:

    procedure(abCreateBigLayoutForm(numFields)
        let((fields field label gridLay)
            for(i 0 numFields
                field=hiCreateStringField(?name concat('myfield i))
                label=hiCreateLabel(?name concat('label i) ?labelText
                    sprintf(nil "Field %d" i)
                )
                fields=tconc(fields list(label 'row i 'col 0))
                fields=tconc(fields list(field 'row i 'col 1))
            )
            fields=tconc(fields list('col_stretch 0 0))
            fields=tconc(fields list('col_stretch 1 1))
            fields=car(fields)
            gridLay=hiCreateGridLayout(
                'gridLay
                ?items fields
            )
            hiCreateLayoutForm(
                'abBigLayoutForm
                "Big layout form"
                ;------------------------------------------------------------
                ; Add a stretchable region below the grid so that 
                ; the fields don't spread out vertically
                ;------------------------------------------------------------
                hiCreateVerticalBoxLayout(
                    'vbox
                    ?items list(
                        gridLay
                        list('stretch_item 1)
                    )
                )
                ?minSize 600:200
            )
        )
    )
    
    

    Simply then call:

    abCreateBigLayoutForm(10)
    hiDisplayForm(abBigLayoutForm)

    Andrew.

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

    Thank you Andrew.

    I have followed your suggestion, using disclosure triangles to replace the frames that cannot be used in layout forms. Is it possible to change font aspect to red & bold? Are there other alternatives to frames defined for app forms?

    Many thanks

    Best regards,

    Aldo

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

    Thank you Andrew.

    I have followed your suggestion, using disclosure triangles to replace the frames that cannot be used in layout forms. Is it possible to change font aspect to red & bold? Are there other alternatives to frames defined for app forms?

    Many thanks

    Best regards,

    Aldo

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

    Hi Aldo,

    Frames are still available, but created a different way. You use the ?frame argument to the functions that create a layout (i.e the functions that match this pattern: ^hiCreate.*Layout$). Since you can nest layouts within other layouts, you can effectively create your own widgets this way or implement frames as before. So this code:

    procedure(abCreateFrameLayoutFields(startNum endNum)
        let((fields field label)
            for(i startNum endNum
                field=hiCreateStringField(?name concat('myfield i))
                label=hiCreateLabel(?name concat('label i) ?labelText
                    sprintf(nil "Field %d" i)
                )
                fields=tconc(fields list(label 'row i 'col 0))
                fields=tconc(fields list(field 'row i 'col 1))
            )
            fields=tconc(fields list('col_stretch 0 0))
            fields=tconc(fields list('col_stretch 1 1))
            fields=car(fields)
        )
    )
    
    procedure(abCreateFrameLayoutForm()
        let((fields frameLay1 frameLay2)
            fields=abCreateFrameLayoutFields(0 3)
            frameLay1=hiCreateGridLayout(
                'frameLay1
                ?items fields
                ?frame "With Title"
            )
            fields=abCreateFrameLayoutFields(4 6)
            frameLay2=hiCreateGridLayout(
                'frameLay2
                ?items fields
                ?frame t ; no title
            )
            hiCreateLayoutForm(
                'abFrameLayoutForm
                "layout form with frames"
                ;------------------------------------------------------------
                ; Add a stretchable region below the grid so that 
                ; the fields don't spread out vertically
                ;------------------------------------------------------------
                hiCreateVerticalBoxLayout(
                    'vbox
                    ?items list(
                        frameLay1
                        frameLay2
                        list('stretch_item 1)
                    )
                )
                ?minSize 600:200
            )
        )
    )
    
    hiDisplayForm(abCreateFrameLayoutForm())

    produces this:

    Regards,

    Andrew.

    • 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