• 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. Allegro X PCB Editor
  3. Set few cells in first row of a grid to * and gray out rest...

Stats

  • Replies 2
  • Subscribers 158
  • Views 12688
  • Members are here 0
More Content

Set few cells in first row of a grid to * and gray out rest of the row

BinduSripad
BinduSripad over 9 years ago

Hi SKILL experts,

I have a grid in a form with last column having a pull-down (combo-box). I have to set the few cells in 1st row to "*" and gray out rest of the row.

The following code sets the 2nd and 3rd cells in 1st row to "*". I am not able to figure out how to gray the rest of the row.

_setCell = axlFormGridNewCell()
_setCell->row = 1
_setCell->col = 2
_setCell->value = "*"
axlFormSetField(myform "ListView1" _setCell)


_setCell = axlFormGridNewCell()
_setCell->row = 1
_setCell->col = 3
_setCell->value = "*"
axlFormSetField(myform "ListView1" _setCell)

Please help!

Thanks,

Bindu

  • Sign in to reply
  • Cancel
Parents
  • B Bruekers
    B Bruekers over 9 years ago

    Hi

    First look at the example fgrid.il in <cdsroot>/share/pcb/examples/skill.

    Best practice is to use the axlFormGridSetBatch function, and make defun in which you update/fill the grid.

    If you type axlFormGridNewCell()->?? then you get the cell structure:

    Skill > axlFormGridNewCell()->??
    (row 0 col 0 value
    nil backColor nil textColor nil
    check nil noEdit nil invisible
    nil objType "gridCell" scriptLabel nil
    popup nil
    )

    So by using _setCell->noEdit=t  and _setCell->backColor='button you can 'grey out' the cell and set a no-edit. 

    Btw, you only need to call once _setCell = axlFormGridNewCell(), and then you can change the values and call axlFormGridBatch(_setCell) to update the cell. 

    so;

    _setCell=axlFormGridNewCell()
    _setCell->row=1
    _setCell->cell=1
    _setCell->value= "row1col1"
    axlFormGridBatch(_setCell)
    _setCell->cell=2
    _setCell->value= "Row1col2"
    axlFormGridBatch(_setCell)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • B Bruekers
    B Bruekers over 9 years ago

    Hi

    First look at the example fgrid.il in <cdsroot>/share/pcb/examples/skill.

    Best practice is to use the axlFormGridSetBatch function, and make defun in which you update/fill the grid.

    If you type axlFormGridNewCell()->?? then you get the cell structure:

    Skill > axlFormGridNewCell()->??
    (row 0 col 0 value
    nil backColor nil textColor nil
    check nil noEdit nil invisible
    nil objType "gridCell" scriptLabel nil
    popup nil
    )

    So by using _setCell->noEdit=t  and _setCell->backColor='button you can 'grey out' the cell and set a no-edit. 

    Btw, you only need to call once _setCell = axlFormGridNewCell(), and then you can change the values and call axlFormGridBatch(_setCell) to update the cell. 

    so;

    _setCell=axlFormGridNewCell()
    _setCell->row=1
    _setCell->cell=1
    _setCell->value= "row1col1"
    axlFormGridBatch(_setCell)
    _setCell->cell=2
    _setCell->value= "Row1col2"
    axlFormGridBatch(_setCell)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
Cadence Guidelines

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