• 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. How to limit the size of cyclic filed in skill

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 7859
  • 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

How to limit the size of cyclic filed in skill

shane park
shane park over 2 years ago

Hello, 

Is there any way to control the size of cyclic filed by 'hiCreateCyclicField'

The size is dicided by the element of the 'choices' list, specifically, by the longest word.

But, I want to limit the size( width) of this field regarless of word length in list.

I use the 'hiCreateCyclicField' in 'field of hiCreateCyclicField '

thank you for any reply in advance.

  • Cancel
Parents
  • AurelBuche
    AurelBuche over 2 years ago

    Hi,

    As Andrew replied you in How to add some polygon (box) in hiCreateAppForm

    You should try hiCreateLayoutForm and associated functions hiCreateFormLayout, hiCreateVerticalBoxLayout, hiCreateHorizontalBoxLayout, hiCreateGridLayout

    Those are more flexible than hiCreateAppForm and might be able to do what you want:

    Here is a little example:

    (hiDisplayForm
    (hiCreateLayoutForm 'example_form "Example"
    (hiCreateFormLayout 'main_layout ?items (list
    (hiCreateLabel ?name 'test_label ?labelText "Hello World!")
    (hiCreateCyclicField ?name 'cyclic ?choices '("Very long string..." "Test" "Another choice"))
    ))
    ?buttonLayout 'Close
    ?dialogStyle 'modeless ;'modal
    ))

    Hope this helps,
    Cheers
    Aurel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • AurelBuche
    AurelBuche over 2 years ago

    Hi,

    As Andrew replied you in How to add some polygon (box) in hiCreateAppForm

    You should try hiCreateLayoutForm and associated functions hiCreateFormLayout, hiCreateVerticalBoxLayout, hiCreateHorizontalBoxLayout, hiCreateGridLayout

    Those are more flexible than hiCreateAppForm and might be able to do what you want:

    Here is a little example:

    (hiDisplayForm
    (hiCreateLayoutForm 'example_form "Example"
    (hiCreateFormLayout 'main_layout ?items (list
    (hiCreateLabel ?name 'test_label ?labelText "Hello World!")
    (hiCreateCyclicField ?name 'cyclic ?choices '("Very long string..." "Test" "Another choice"))
    ))
    ?buttonLayout 'Close
    ?dialogStyle 'modeless ;'modal
    ))

    Hope this helps,
    Cheers
    Aurel

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

    Aurel,

    Not sure why yours is truncated - for me the text is fully shown with the example you've given.

    I'm not aware of a way of limiting the maximum size of a cyclic field. That said, I've never wanted to do so...

    Andrew

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

    Sorry, the ?initialSize argument is missing in my example

    But my point was just that using layouts, I believe truncating the field is achievable

    It might require nested layouts with spacer and stretch items as well to get a specific result

    And I agree it seems like an odd request to me 

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

    Thank you for replying.

    I have curious that why size of cyclic field does not be adjustable like 'hiCreateStringField'.

    hiCreateStringField is easy to be adjustable when putting it form, like below

      list(formStringFiled   020:095 290:030 90)  --- this element of ?fields in tabField(hiCreateTablField)

      the '290' could be the size of its field.

    But,  even the 'cyclicFiled' is listed on ?Fileds like 'StringFiled' but its size can't be adjustable...

    I tried what you told me, but the size of cyclic field is limited by the main window size. it means, if the size of main window is enough large, the size of cyclic filed also be largened.

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

    I think it's historical - I'm not really sure why.

    You could use a combo box instead (which is a newer field type) - this does allow you to constrain the width with 2D forms:

    (hiDisplayForm
     (hiCreateAppForm 
       ?name 'exampleForm
       ?formTitle "Example Form"
       ?fields (list
         (list
           ;(hiCreateCyclicField ?name 'cyclic ?choices '("Very long string..." "Test" "Another choice" "A really long string with many characters and so on") ?prompt "test")
           (hiCreateComboField ?name 'cyclic ?items '("Very long string..." "Test" "Another choice" "A really long string with many characters and so on") ?editable nil ?prompt "test" ?defValue "Very long string...")
           0:0 200:30 90)
           )
       ?buttonLayout 'Close
       ;?dialogStyle 'modeless ;'modal
       ))

    Andrew

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

    Hi, 

    You might have better results using Andrew's solution with combo box fields.
    But I made some trials and they might give you hints :

    (hiDisplayForm
    (hiCreateLayoutForm 'example_form "Example"
    (hiCreateFormLayout 'main_layout ?items (list
    (hiCreateLabel ?name 'test_label ?labelText "Hello World!")
    (hiCreateHorizontalBoxLayout 'h_layout ?items (list
    (list (hiCreateCyclicField ?name 'cyclic ?choices '("Very long string..." "Test" "Another choice")) 'stretch 0)
    ;'(spacer_item 10)
    ;'(stretch_item 10)
    (list (hiCreateSeparatorField ?name 'separator) 'stretch 1)
    ))
    ))
    ?buttonLayout 'Close
    ?dialogStyle 'modeless ;'modal
    ;?initialSize '(130 94)
    ))

    You can see that the cyclic field has two degrees of stretchability. The field itself can be compressed and extended until it reaches its maximum size then the stretch 0 takes over and the separator becomes stretched instead.

    I believe you will not be able to bypass this double stretch mechanism for the cyclic fields (probably inherited from a Qt construction)

    I'll be nicely surprised if you prove me wrong

    I let the spacer_item and stretch_item commented so you have an example of how to use them in case you were not already aware

    Hope this helps

    Cheers,

    Aurélien

    • 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