• 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. Some help need for using hiCreateTabField

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 144
  • Views 14550
  • 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

Some help need for using hiCreateTabField

llobak
llobak over 15 years ago

 Hi,

 I wouldl like to use the command hiCreateTabField and i need some guidance.

 

let say i've create a GUI with 3 tab ("layout" , "schematic" and "symbol")

is there any way for me to check which tab i'm in? let say by default the GUI start at "layout" tab. But if the user change it to "schematic" tab, how can i check that the user is using "schematic tab?

 

Thanks for the help

SL

  • Cancel
  • kbhow
    kbhow over 15 years ago

    Hi SL,

    Upon creation of a form with tab, you needs to set the ?pageBase of the tab in hiCreateTabField in order for you to get the tab info. For example:

    tabfield = hiCreateTabField( ?name 'tabfield

                                            ?fields list( field1() field2() field3())

                                            ?tabs list("layout" "schematic" "symbol")

                                            ?pageBase "TAB"

                                            ?tabOrderIsAddOrder t

                                            ?pageScroller t)

     

    TAB1 will be the tab for "layout", TAB2 for "schematic", and TAB3 for "symbol".

    In order to get the information of the tab, you can use Form->tabfield->TAB1->item1->value, same as others.

    Rgds,

    How

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 15 years ago

     Hi SL,

    If you are using IC612 or later you can reference the tab page by its name also.  If you do not specify the pageBase, then I believe the default is "page", so you can refer to the page using, in the following example, page_layout, page_schematic or page_symbol

    
    
    procedure(fun(arg)
      list(
        hiCreateLabel(
          ?name concat('label arg)
          ?labelText case(arg (1 "layout") (2 "schematic") (3 "symbol"))
        )
        0:0 30:50 50
      )
    )
    
    tabField = hiCreateTabField(
      ?name 'tabField
      ?fields list(list(fun(1)) list(fun(2)) list(fun(3)))
      ?tabs list("layout" "schematic" "symbol")
      ?tabOrderIsAddOrder t
      ?pageScroller t)
    
    form = hiCreateAppForm(
      ?name 'tabTestForm
      ?formTitle "Tab Test Form"
      ?fields list(list(tabField 0:0 400:100 50))
    )
    
    hiDisplayForm(form)
    
    

     So I can access form->tabField->page_schematic

    However, to find which field is currently in use, I think that you can use the hiGetCurrentField() function, but this only works for type-in fields that have the focus so it definitely wont work with the example above.  I've just been trying to get the current tab for other forms but I have not yet worked this out...

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Quek
    Quek over 15 years ago

    Hi Everyone

    I did some testing and found that we can get the current tab using the value of the tab item. E.g.

    myTabs=hiCreateTabField( ... )

    In ciw, if you query for the value of "myTabs", you will get the current tab. E.g. I have 5 tabs in my form, if I query using:

    hiGetCurrentForm()~>myTabs->value

    I will get "3" if the 3rd tab is currently active. You can then work backwards to get a handle to that tab.E.g.

    myForm=hiGetCurrentForm()
    sprintf(curTab "%n" myForm~>myTabs~>value)
    handle=evalstring(strcat("myForm~>myTabs~>page" curTab))

    Best regards
    Quek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • llobak
    llobak over 15 years ago

     Thanks for the guidance from How, Lawrence and Quek! Really appreciate the help from you guys.

     

    Regards,

    SL

    • 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