• 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. Is it possible to add a new tab to an existing tab fiel...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 1875
  • 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

Is it possible to add a new tab to an existing tab field

FrncsJRClement
FrncsJRClement over 11 years ago

 Hello,

 Does anyone know whether it is possible to add a new tab page to an existing tab field?

Could find an answer neither in skuiref.pdf, nor on this forum.

Here is what was tried to no avail:

1) Initial form creation:

Code example (stored in file "tabTest.il"):

 procedure( cwsFx(x_pageNumber)
  hiCreateFloatField(
    ?name       concat('float_ x_pageNumber)
    ?prompt     "Scaling"
    ?value      1.0
    ?range      '(1e-30 1e30)
  )
) ; procecure cwsFx


let( (tabField)
  unless( boundp('CWSTestForm)
    tabField = hiCreateTabField(
      ?name     'CWSTestTab
      ?fields   list(
                  list(
                    list( cwsFx(1) 0:0 400:30 80 )
                  )
                  list(
                    list( cwsFx(2) 0:0 400:30 80 )
                  )
                )
    ) ; hiCreateTabField

    CWSTestForm = hiCreateAppForm(
      ?name             'CWSTestForm
      ?formTitle        "CWS Test Form"
      ?fields           list(
                          list(tabField 0:0 600:200)
                        )
      ?dontBlock        t
    ) ; hiCreateAppForm
    hiInstantiateForm(CWSTestForm)
  ) ; unless boundp CWSTestForm

  hiDisplayForm(CWSTestForm)
  printf("form handle is CWSTestForm\n")
  printf("CWSTestForm->CWSTestTab->page1->fieldType is '%L'.\n" CWSTestForm->CWSTestTab->page1->fieldType)
) ; let

Execution in CIW:

load("tabTest.il")

Result:

form handle is CWSTestForm
CWSTestForm->CWSTestTab->page1->fieldType is 'scrollRegion'.
t

2) Attempt #1:

Code example:

procedure( addTabPageAttempt1()
  let( (pageCount newPageNumber newPageSymbol newPage)
    pageCount = if( listp(CWSTestForm->CWSTestTab->fieldList) length(CWSTestForm->CWSTestTab->fieldList) 1)
    newPageNumber = add1(pageCount)
    newPageSymbol = concat('page newPageNumber)
    newPage = hiCreateScrollRegion(
      ?name       newPageSymbol
      ?fields     list(
                    list( cwsFx(newPageNumber) 0:0 400:30 80 )
                  )
    ) ; hiCreateScrollRegion
    putprop(CWSTestForm->CWSTestTab newPage newPageSymbol)
    if( pageCount > 1
    then
      append(CWSTestForm->CWSTestTab->fieldList list(newPage))
    else
      CWSTestForm->CWSTestTab->fieldList = list(CWSTestForm->CWSTestTab->fieldList newPage)
    ) ; if pageCount > 1
    hiDisplayForm(CWSTestForm) ; form refresh
  ) ; let
) ; procedure addTabPageAttempt1

Execution in CIW:

 addTabPageAttempt1()

Result:

 t (no change in displayed form...)

3) Attempt #2:

Code example:

procedure( addTabPageAttempt2()
  let( (pageCount newPageNumber newPageSymbol newPage)
    pageCount = if( listp(CWSTestForm->CWSTestTabNumber) length(CWSTestForm->CWSTestTabNumber) 1)
    newPageNumber = add1(pageCount)
    newPageSymbol = concat('page newPageNumber)
    newPage = hiCreateScrollRegion(
      ?name       newPageSymbol
      ?fields     list(
                    list( cwsFx(newPageNumber) 0:0 400:30 80 )
                  )
    ) ; hiCreateScrollRegion
    hiAddField(CWSTestForm->CWSTestTab newPage)
    hiDisplayForm(CWSTestForm) ; form refresh
  ) ; let
) ; procedure addTabPageAttempt2

Execution in CIW:

addTabPageAttempt2()

Result:

*WARNING* Illegal 2D field description:

*WARNING* scrollRegionStruct@0x15a05980

*WARNING* hiAddField: invalid 2D field description

t (no change in displayed form...)

 

Many thanks for your help

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

    There's no mechanism for doing this right now - tab pages cannot be added (or removed) dynamically other than enabling or disabling them dynamically.

    The alternative is to recreate the tab field completely, adding a new page on, and then replace the original tab field on the form. That would be easy enough to implement.

    Regards,

    Andrew.

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

    There's no mechanism for doing this right now - tab pages cannot be added (or removed) dynamically other than enabling or disabling them dynamically.

    The alternative is to recreate the tab field completely, adding a new page on, and then replace the original tab field on the form. That would be easy enough to implement.

    Regards,

    Andrew.

    • 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