• 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. Resizing the button field height in a form

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 9502
  • 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

Resizing the button field height in a form

SnSkill
SnSkill over 3 years ago

Hi All, 

I am creating a form using the hiCreateLayoutForm() method where the layout of the form is based on vertical box layout and each item of the vertical box is a grid layout. Each field item is added to the item list of the Grid layout and there are several buttons in the form. 

The general button field code looks like

grid = hiCreateGridLayout( 'grid ?items list( ...........various items ..............

      list(
            hiCreateButton(
            ?name 'vv
            ?buttonText ""
            ?callback "cbfunction()"
     )
     'row 4 'col 3
))

I am trying to increase the height (by either resizing or setting minimum height) of all the buttons in the form created. I have tried various methods like 

1. hiSetFieldMinSize (formName 'vv ?widgetHeight 20) -> but this leads to the error that 'vv is not instantiated

Also hiResizeField seems to work only on hiCreateAppForm method form and not on hiCreateLayoutForm. 

Any help is appreciated, Thanks!

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    You can set the minimum row height in hiCreateGridLayout, but if you just want to set the field size, the form does indeed need to have been instantiated - which is just a matter of using hiInstantiateForm as follows (I changed the min size to 40 to make it stand out a bit more and added a couple of extra fields to show how it works):

    grid = hiCreateGridLayout( 'grid ?items 
    
    list(
         list(
         hiCreateStringField(
           ?name 'ent1
        ) 'row 4 'col 2)
    
          list(
                hiCreateButton(
                ?name 'vv
                ?buttonText ""
                ?callback "cbfunction()"
         )
         'row 4 'col 3
        )
         list(
         hiCreateStringField(
           ?name 'ent2
        ) 'row 2 'col 2)
    
          list(
                hiCreateButton(
                ?name 'vv2
                ?buttonText ""
                ?callback "cbfunction()"
         )
         'row 2 'col 3
        )
    )
    )
    hiCreateLayoutForm(
      'ForumForm
      "Forum Form"
      grid
    )
    
    hiInstantiateForm(ForumForm)
    hiSetFieldMinSize(ForumForm 'vv ?widgetHeight 40)
    hiDisplayForm(ForumForm)
    
    

    The result looks like this:

    (the bottom right button is the one with the increased height in the example above).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • SnSkill
    SnSkill over 3 years ago in reply to Andrew Beckett

    Hi Andrew, Thanks a lot, You made my task easier. 

    Now I understand what to do.

    • 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