• 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 Create Frame Field in layout grid option

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 11702
  • 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 Create Frame Field in layout grid option

saurabh96
saurabh96 over 4 years ago

Hey there!..Can anyone explain how can i create a frame field using grid layout option not in co-ordinate based... ..I want below box in frame named "LIBRARY" ...can you help me with an example

let(Label1 Label2 enter1 enter2)

Label1=hiCreateLabel(
?name 'Label1 ?labelText "Library Name "
?justification 'right
)

enter1=hiCreateStringField(
?name 'enter1 )

Label2=hiCreateLabel(
?name 'Label2 ?labelText "Cell Name "
?justification 'right
)

enter2=hiCreateStringField(
?name 'enter2 )

gridLayout=hiCreateGridLayout(
'gridLayout
?items list(
list( Label1'row 0 'col 0 )
list(Label2 'row 1 'col 0 )
list(enter1 'row 0 'col 1 )

list(enter2' 'row 1 'col 1 )

hiCreateLayoutForm(
'CCFexampleLayForm
"Parameters"
hiCreateVerticalBoxLayout(
'vbox
?items list(
gridLayout
list('stretch_item 1)
)
)

hiDisplayForm(CCFexampleLayForm)

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

    After fixing the usual collection of missing or misplaced parentheses, missing spaces, quotation marks in the wrong place (do you ever test your code?), it's as simple as I'd indicated in my previous post on this - you add ?frame "LIBRARY" to the hiCreateGridLayout call:

    let((Label1 Label2 enter1 enter2 gridLayout)
    
      Label1=hiCreateLabel( 
        ?name 'Label1 ?labelText "Library Name "
        ?justification 'right
      )
    
      enter1=hiCreateStringField( 
        ?name 'enter1 )
    
      Label2=hiCreateLabel(
        ?name 'Label2 ?labelText "Cell Name "
        ?justification 'right
      )
    
      enter2=hiCreateStringField(
        ?name 'enter2 )
    
      gridLayout=hiCreateGridLayout(
        'gridLayout
        ; as simple as this:
        ?frame "LIBRARY"
        ?items list(
          list(Label1 'row 0 'col 0 )
          list(Label2 'row 1 'col 0 )
          list(enter1 'row 0 'col 1 )
          list(enter2 'row 1 'col 1 )
        )
      )
    
      hiCreateLayoutForm(
        'CCFexampleLayForm
        "Parameters" 
        hiCreateVerticalBoxLayout(
          'vbox
          ?items list(
            gridLayout
            list('stretch_item 1)
          )
        )
      )
    
      hiDisplayForm(CCFexampleLayForm)
    )

    Of course, this doesn't match your screen shot because that has a Browse button in and your code doesn't contain that.

    Andrew.

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

    After fixing the usual collection of missing or misplaced parentheses, missing spaces, quotation marks in the wrong place (do you ever test your code?), it's as simple as I'd indicated in my previous post on this - you add ?frame "LIBRARY" to the hiCreateGridLayout call:

    let((Label1 Label2 enter1 enter2 gridLayout)
    
      Label1=hiCreateLabel( 
        ?name 'Label1 ?labelText "Library Name "
        ?justification 'right
      )
    
      enter1=hiCreateStringField( 
        ?name 'enter1 )
    
      Label2=hiCreateLabel(
        ?name 'Label2 ?labelText "Cell Name "
        ?justification 'right
      )
    
      enter2=hiCreateStringField(
        ?name 'enter2 )
    
      gridLayout=hiCreateGridLayout(
        'gridLayout
        ; as simple as this:
        ?frame "LIBRARY"
        ?items list(
          list(Label1 'row 0 'col 0 )
          list(Label2 'row 1 'col 0 )
          list(enter1 'row 0 'col 1 )
          list(enter2 'row 1 'col 1 )
        )
      )
    
      hiCreateLayoutForm(
        'CCFexampleLayForm
        "Parameters" 
        hiCreateVerticalBoxLayout(
          'vbox
          ?items list(
            gridLayout
            list('stretch_item 1)
          )
        )
      )
    
      hiDisplayForm(CCFexampleLayForm)
    )

    Of course, this doesn't match your screen shot because that has a Browse button in and your code doesn't contain that.

    Andrew.

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

    Hi Andrew,I got the point...few are my back questions, suppose...I have added more inputs like toggle field and radio buttons...Now I want that frame field should be different for different field for, eg..in radio field..its should frame as "RADIO", and for toggle, it should be 'TOGGLE."
    But for the above code, if I implement frame in grid code, i.e. it is appearing LIBRARY for all the blocks..how to make different frame fields for different entities.

    I have test below code and attach snap.

    Regrds,

    Srv

    let((Label1 Label2 enter1 enter2 gridLayout Entry toggle_Entry)

    Label1=hiCreateLabel(
    ?name 'Label1 ?labelText "Library Name "
    ?justification 'right
    )

    enter1=hiCreateStringField(
    ?name 'enter1 )

    Label2=hiCreateLabel(
    ?name 'Label2 ?labelText "Cell Name "
    ?justification 'right
    )

    Entry=hiCreateRadioField(
    ?name 'Entry
    ?choices list("a" "b")
    ?value "a"
    ?enabled t
    )

    toggle_Entry=hiCreateToggleField(
    ?name 'toggle_Entry
    ?choices list(list('aa "check1") list('bb "check1 & check2") ))

    enter2=hiCreateStringField(
    ?name 'enter2 )

    gridLayout=hiCreateGridLayout(
    'gridLayout
    ; as simple as this:
    ?frame "LIBRARY"
    ?items list(
    list(Label1 'row 0 'col 0 )
    list(Label2 'row 1 'col 0 )
    list(enter1 'row 0 'col 1 )
    list(enter2 'row 1 'col 1 )
    list(Entry 'row 2 'col 0 )
    list(toggle_Entry 'row 3 'col 0 )

    )
    )

    hiCreateLayoutForm(
    'CCFexampleLayForm
    "Parameters"
    hiCreateVerticalBoxLayout(
    'vbox
    ?items list(
    gridLayout
    list('stretch_item 1)
    )
    )
    )

    hiDisplayForm(CCFexampleLayForm)
    )

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

    You can simply include layouts within layouts to do this. Here I've just included three grid layouts within a vertical box layout (which was in the code originally) to achieve this - as you can see, this is pretty clear and simple compared with the old coordinate-based approach:

    let((Label1 Label2 enter1 enter2 Entry toggle_Entry)
    
      Label1=hiCreateLabel( 
        ?name 'Label1 ?labelText "Library Name "
        ?justification 'right
      )
    
      enter1=hiCreateStringField( 
        ?name 'enter1 )
    
      Label2=hiCreateLabel(
        ?name 'Label2 ?labelText "Cell Name "
        ?justification 'right
      )
    
      Entry=hiCreateRadioField(
        ?name 'Entry
        ?choices list("a" "b")
        ?value "a"
        ?enabled t 
      )
    
      toggle_Entry=hiCreateToggleField(
        ?name 'toggle_Entry
        ?choices list(list('aa "check1") list('bb "check1 & check2") ))
    
      enter2=hiCreateStringField(
        ?name 'enter2 )
    
      hiCreateLayoutForm(
        'CCFexampleLayForm
        "Parameters" 
        hiCreateVerticalBoxLayout(
          'vbox
          ?items list(
            hiCreateGridLayout(
              'libraryFrame
              ?frame "LIBRARY"
              ?items list(
                list(Label1 'row 0 'col 0 )
                list(Label2 'row 1 'col 0 )
                list(enter1 'row 0 'col 1 )
                list(enter2 'row 1 'col 1 )
              )
            )
            hiCreateGridLayout(
              'radioFrame
              ?frame "RADIO"
              ?items list(
                list(Entry 'row 0 'col 0 )
              )
            )
            hiCreateGridLayout(
              'toggleFrame
              ?frame "TOGGLE"
              ?items list(
                list(toggle_Entry 'row 0 'col 0 )
              )
            )
            ; this stops the items above getting vertical space
            ; between them as the form is stretched
            list('stretch_item 1)
          )
        )
      )
    
      hiDisplayForm(CCFexampleLayForm)
    )
    
    

    This gives this:

    Regards,

    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