• 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. hi*Layout expanding string/button fields in the gui

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 2616
  • 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

hi*Layout expanding string/button fields in the gui

psill00
psill00 over 2 years ago

Using hi*LayoutForm is there a way to expand the size of the string/button fields in the gui?

I have looked at the sample example CCSformLayout.il 

I dont see a way expanding the size of the button/string fields and changing the placement of the form items as the gui changes in size.

One more question if the above is possible, when adding and is option in the add item that need to be added to change the size of the button/string?

 

When I use the function hiCreateAppForm I can change the size of a button/string fields with the variable ?attachmentList

Paul

  • Cancel
Parents
  • AurelBuche
    AurelBuche over 2 years ago

    Hi Paul,

    This is just because the form you are looking at is using `hiCreateButtonBoxField' and not `hiCreateButton'

    Here is an example that should provide you with everything you need regarding form layouts:

    (hiDisplayForm
      (hiCreateLayoutForm 'custom_form "Custom Form"
        (hiCreateFormLayout 'main_layout ?items (list
            (hiCreateButtonBoxField
              ?name   'buttonField1
              ?prompt ""
              ?choices  '("Browse"     "Display"    )
              ?callback '("CCSbrowsed" "CCSdisplay" )
              )
            (hiCreateHorizontalBoxLayout 'buttons_layout ?items (list
                '(spacer_item 20)
                (list
                  (hiCreateButton ?name 'button0 ?buttonText "Stretch 1" ?callback (lambda (@rest _args) nil))
                  'stretch 1)
                '(stretch_item 1)
                (list
                  (hiCreateButton ?name 'button1 ?buttonText "Stretch 2" ?callback (lambda (@rest _args) nil))
                  'stretch 2)
                (hiCreateButton ?name 'button2 ?buttonText "No Stretch" ?callback (lambda (@rest _args) nil))
                ));buttons_layout
            ));main_layout
        ))

    Note that stretch, stretch_item and spacer_item only works inside `hiCreateHorizontalBoxLayout' and `hiCreateVerticalBoxLayout'

    If you use `hiCreateFormLayout' your fields will not expand vertically although the field prompts will align nicely

    Hope this helps,

    Aurélien

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill00
    psill00 over 2 years ago in reply to AurelBuche

    Thanks for the info
    It has helped a lot on understanding the hi*Layout forms

    Is there a way to either have the fields larger or stretchable in the vertical or y direction?

    Paul

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to psill00

    Fields will "stretch" vertically too (provided that you are allowing it in the appropriate layout). However, for most fields it doesn't make sense for them to get larger vertical (unless the fonts are increased in size); there are exceptions such as multi-line text fields, list boxes and so on - these clearly make sense to grow vertically.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill00
    psill00 over 2 years ago in reply to Andrew Beckett

    Its good to know it s possible ( a hint on how to do it would be nice )

    Reviewing the functions hi*Layout, it seems the functions to create the form would be below ( rough skeleton of rht format I will use )

    hiCreateLayoutForm('ExGridLayout "Grid"
          hiCreateVerticalBoxLayout('vbox
              ?items list(
                    hiCreateGridLayout('grid
                        ?items list(
                              list(hiCreateLabel(
                                      ?name 'enableLabel
                                      ?labelText "Enable")
                                       'row 0 'col 0)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • psill00
    psill00 over 2 years ago in reply to Andrew Beckett

    Its good to know it s possible ( a hint on how to do it would be nice )

    Reviewing the functions hi*Layout, it seems the functions to create the form would be below ( rough skeleton of rht format I will use )

    hiCreateLayoutForm('ExGridLayout "Grid"
          hiCreateVerticalBoxLayout('vbox
              ?items list(
                    hiCreateGridLayout('grid
                        ?items list(
                              list(hiCreateLabel(
                                      ?name 'enableLabel
                                      ?labelText "Enable")
                                       'row 0 'col 0)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to psill00

    Recent versions of the tools (plus on support.cadence.com) have got better examples (I created a bunch of them) but of course they don't cover everything. Here's an example of a multi-line text field which stretches in both dimensions and the label stays where it is:

    hiCreateLayoutForm('ForumStretchLayout "Grid"
      hiCreateGridLayout('grid
        ?items list(
          list(
            hiCreateLabel(
              ?name 'bigTextLabel
              ?labelText "<b>Big Text</b>"
            )
            'row 0 'col 0 'vert_align 'top
          )
          list(
            hiCreateMLTextField(
              ?name 'bigText
            )
            'row 0 'col 1
          )
          list('col_stretch 0 0)
          list('col_stretch 1 1)
          list('row_stretch 0 1)
        )
      ?frame "My frame"
      )
    )
    
    hiDisplayForm(ForumStretchLayout)
    

    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