• 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 use Vertical/horizontal spacers in skill gui

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 143
  • Views 5120
  • 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 use Vertical/horizontal spacers in skill gui

saurabh96
saurabh96 over 4 years ago

Hey,
Can anyone guide me on using vertical/horizontal spacers as when I am selecting the option "60"nm from combo box, group box gets to disappear but is created void gap in GUI? How to remove that void gap..also when am stretching GUI..boxes is not stretching and  remains in their original shape...pls guide am newbie to this.

procedure(Switches()
let((techNodes rules rulesTbl )

net= hiCreateStringField(
?name 'net
?prompt "Net Path"
?value ""
)

button_net_data = hiCreateButton(
?name 'button_net_data
?buttonText "Browse"
?callback "ddsFileBrowseCB(hiGetCurrentForm() 'net \"\" 'fileOnly)"
)

rulesTbl = (makeTable 'rulesTbl nil)
rulesTbl["60nm"] = rulesTbl["50nm"] =rulesTbl["90nm"] = (list "rule7" "rule2" "rule9")
rulesTbl["10nm"] = rulesTbl["40nm"] =rulesTbl["80nm"] = (list "rule1" "rule4")

techNodes = (hiCreateCyclicField
?name 'techNodes
?prompt "Tech Nodes"
?choices (list "10nm" "40nm" "50nm" "60nm" "80nm" "90nm")
?callback "MytechAndHideFields(hiGetCurrentForm())"

)

rules = (hiCreateCyclicField
?name 'rules
?prompt "Rules"
?choices (list "rule1" "rule4"))



abc_string = hiCreateStringField(
?name 'xyz_string
?prompt "Clamp"
?invisible t
?value ""
)
xyz_string = hiCreateStringField(
?name 'abc_string
?prompt "Cell"
?invisible t
?value ""
)

frm2 = hiCreateFrameField(
?name 'frm2
?invisible t
?labelText "HV"
)


AppForm = hiCreateAppForm(
?name 'AppForm
?formTitle "Parameters"
?fields list( list(techNodes 10:1 300:10 80 1)
list(rules 10:40 380:60 60)
list(net 10:180 300:10 100 1)
list(button_net_data 315:183 60:25 1 1)
list(abc_string 10:560 300:10 100 1)
list(xyz_string 10:600 300:10 100 1)
list(frm2 5:550 500:140 10)
)
)

)
hiDisplayForm(AppForm)
)

procedure(MytechAndHideFields(form)
form->rules->choices = rulesTbl[form->techNodes->value]
case(form->techNodes->value
("60nm"
form->abc_string->invisible = form->xyz_string->invisible = form->frm2->invisible =t
)
(t
form->abc_string->invisible= form->xyz_string->invisible = form->frm2->invisible =nil
)
)
)

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    If you want fields to resize, and spacing to adjust as you alter the visibility, you really need to use the newer "layout" forms rather than coordinate-based forms (layout forms were newly added in IC617). As usual, your code doesn't run properly (the hiDisplayForm is outside of the let, so the rulesTable is no longer in scope, and the callback is trying to access a field on the form that doesn't exist any more) - it also doesn't reflect the picture you shared.

    Nevertheless, I've given you an example here of using a simple layout form. I'm using hiCreateFormLayout as this is simple - it doesn't however give you the ability to have multiple columns - if you wanted that, you'd need to use hiCreateGridLayout (search on these forums for an example using that) - that would complicate matters as you really need to create separate labels rather than using the built-in prompts in the fields otherwise the fields don't line up nicely.

    A key change I also had to make was to move the rulesTable into the callback function; this is because the form layouts are non-blocking, so the callback would not be able to see a local variable within the Switches function as it is no longer in scope at the time the callback is invoked.

    Hope this helps - I invented some more conditions to show fields becoming visible/invisible to show the principles (I also put the fields into a let at the top so that you weren't creating global variables all over the place).

    Andrew

    procedure(Switches()
      let((techNodes rules net button_net_data abc_string xyz_string
          frm2 formLayout) 
    
        net= hiCreateStringField(
          ?name 'net 
          ?prompt "Net Path"
          ?value "" 
        )
    
        button_net_data = hiCreateButton(
          ?name 'button_net_data 
          ?buttonText "Browse" 
          ?callback "ddsFileBrowseCB(hiGetCurrentForm() 'net \"\" 'fileOnly)"
        )
    
        techNodes = (hiCreateCyclicField
          ?name 'techNodes
          ?prompt "Tech Nodes"
          ?choices (list "10nm" "40nm" "50nm" "60nm" "80nm" "90nm")
          ?callback "MytechAndHideFields(hiGetCurrentForm())"
        )
    
        rules = (hiCreateCyclicField
          ?name 'rules
          ?prompt "Rules"
          ?choices (list "rule1" "rule4")
        )
    
        abc_string = hiCreateStringField(
          ?name 'xyz_string 
          ?prompt "Clamp"
          ?invisible nil
          ?value "" 
        ) 
    
        xyz_string = hiCreateStringField(
          ?name 'abc_string 
          ?prompt "Cell"
          ?invisible nil
          ?value "" 
        )
    
        frm2 = hiCreateFrameField(
          ?name 'frm2
          ?invisible t
          ?labelText "HV"
        )
    
    
        ; rather than using a coordinate approach, use a "layout" form.
        ; For simplicity, using a form layout (which takes care of aligning
        ; the prompts). Otherwise you might use hiCreateGridLayout but then
        ; you need to use fields without prompts and separate labels in different
        ; columns - gives more flexibility (but more complex)
        formLayout=hiCreateFormLayout(
          'formLayout
          ?items list(
            techNodes rules net button_net_data abc_string xyz_string
          )
        )
        /*
        AppForm = hiCreateAppForm(
          ?name 'AppForm
          ?formTitle "Parameters"
          ?fields list( list(techNodes 10:1 300:10 80 1) 
          list(rules 10:40 380:60 60)
          list(net 10:180 300:10 100 1)
          list(button_net_data 315:183 60:25 1 1)
          list(abc_string 10:560 300:10 100 1)
          list(xyz_string 10:600 300:10 100 1)
          list(frm2 5:550 500:140 10) 
        )
        )
        */
        hiCreateLayoutForm(
          'AppForm
          "Parameters"
          formLayout
        )
        ; have to instantiate form first before changing invisibility
        ; there is a bug where ?invisible t on the fields leaves the
        ; prompt visible
        hiInstantiateForm(AppForm)
        MytechAndHideFields(AppForm)
    
      hiDisplayForm(AppForm)
      )
    )
    
    procedure(MytechAndHideFields(form)
      let((rulesTbl)
        ; moved the rules table here as cannot use dynamic scoping
        ; with layout forms as the forms are non-blocking by design
        rulesTbl = (makeTable 'rulesTbl nil)
        rulesTbl["60nm"] = rulesTbl["50nm"] =rulesTbl["90nm"] = (list "rule7" "rule2" "rule9")
        rulesTbl["10nm"] = rulesTbl["40nm"] =rulesTbl["80nm"] = (list "rule1" "rule4")
    
        form->rules->choices = rulesTbl[form->techNodes->value]
        case(form->techNodes->value
          ("10nm"
            form->abc_string->invisible=t
            form->xyz_string->invisible=t
          )
          ("60nm"
            form->abc_string->invisible=t
            form->xyz_string->invisible=t
          )
          ("50nm"
            form->abc_string->invisible=nil
            form->xyz_string->invisible=t
          )
          ("80nm"
            form->abc_string->invisible=t
            form->xyz_string->invisible=nil
          )
          (t
            form->abc_string->invisible=nil
            form->xyz_string->invisible=nil
          )
        )
      )
    )
    
    
    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • saurabh96
    saurabh96 over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    Can you please provide any example in which includes how to create (group box ,browse to cell view in library manger) using hiCreateGridLayout??

    Regards,

    srv

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to saurabh96

    I have no idea what you mean by "(group box ,browse to cell view in library manger)".

    Andrew

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

    Perhaps this post is what you mean?

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

    Perhaps this post is what you mean?

    • Cancel
    • Vote Up 0 Vote Down
    • 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