• 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. Templet of "hiCreateListBoxField" and "callBack" from form...

Stats

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

Templet of "hiCreateListBoxField" and "callBack" from form.

anola123
anola123 over 2 years ago

Hi,

I'm new to the skill language and attempted the " hiCreateListBoxField" command but couldn't get the output. I want a simple template in which I can enter a list of strings into a form and when I select any of the items in the list, it will print that specific string.

I know it's a simple question, but I'm stumped and looking for an answer.

  • Cancel
  • AurelBuche
    AurelBuche over 2 years ago

    Hi,

    Here you go:

    (hiDisplayForm
      (hiCreateLayoutForm 'custom_form "Custom Form"
        (hiCreateFormLayout 'main_layout ?items (list
            (hiCreateListBoxField ?name 'list_box_field
              ?choices '("string 0"
                         "string 1"
                         "string 2"
                         "string 3"
                         )
              ?multipleSelect nil
              ?changeCB
              (lambda (field form)
                (let ((str (or (car (hiGetListBoxValue field)) "*no string selected*")))
                  (printf "%s" str)
                  nil))
              );list_box_field
            ));main_layout
        ))
    
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • anola123
    anola123 over 2 years ago in reply to AurelBuche
    1. Thanks for the reply.If you won't mind can you explain the changeCB part and why didn't we used callback option ?? 
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to anola123

    The difference between ?callback and ?changeCB is that the callback only gets triggered when the field has changed and the focus moves away from the field (e.g. moving the cursor outside of the form or moving to another field), whereas changeCB gets triggered as soon as a change is made (the focus does not need to change). The documentation states that - you could change it to ?callback and observe the difference, I think (I didn't try Aurélien's code but I trust it implicitly!)

    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