• 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. Form buttons

Stats

  • Replies 1
  • Subscribers 143
  • Views 63
  • Members are here 0

Form buttons

AE202502048334
AE202502048334 17 hours ago

Hi all, I'm trying to create a from with user defined buttons.
I'm trying the following code but can't get it to work:

main = hiCreateFornLayout('main_layout ?items () )

form = hiCreateLayoutForm(

             'myForm

             'myTitle

             ?buttonLayout '(Empty (btn1 btn1_CB()) (btn2 btn2_CB()) (Close hiFormClose()))

)

hiDisplayForm(form)

The part I'm having issues with is buttonLayout part, I can't seem to understand the syntax in the DOCs 

  • Cancel
  • Sign in to reply
Parents
  • Andrew Beckett
    Andrew Beckett 16 hours ago

    There's a typo in the documentation (you originally had '('Empty ...) but I see you've corrected the mistake). Now the issue is that the callbacks need to be either an unquoted name of a function or a string. So something like this:

    main = hiCreateFormLayout('main_layout ?items () )
    
    form = hiCreateLayoutForm(
                 'myForm
                 "myTitle"
                 main
                 ?buttonLayout '(Empty (myFun1 "myFun1()") (myFun2 "myFun2()") (Close hiFormClose))
    
    )
    
    hiDisplayForm(form)
    

    The first two buttons have a full function call expression to invoke, and the third is the name of the function to call (and this gets passed the form id).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett 16 hours ago

    There's a typo in the documentation (you originally had '('Empty ...) but I see you've corrected the mistake). Now the issue is that the callbacks need to be either an unquoted name of a function or a string. So something like this:

    main = hiCreateFormLayout('main_layout ?items () )
    
    form = hiCreateLayoutForm(
                 'myForm
                 "myTitle"
                 main
                 ?buttonLayout '(Empty (myFun1 "myFun1()") (myFun2 "myFun2()") (Close hiFormClose))
    
    )
    
    hiDisplayForm(form)
    

    The first two buttons have a full function call expression to invoke, and the third is the name of the function to call (and this gets passed the form id).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data

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