• 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. How do I change a cells background color without using a...

Stats

  • Replies 8
  • Subscribers 160
  • Views 16839
  • Members are here 0
More Content

How do I change a cells background color without using a style

iCraig
iCraig over 9 years ago

I'd like to set the background color of a cell based on a pass/fail criteria. I don't really want to create a style for all the various combination, especially since axlSpreadsheetSetStyleParent() doesn't work.


Thanks,

Craig

  • Cancel
  • Sign in to reply
  • eDave
    eDave over 9 years ago

    red = axlSpreadsheetGetRGBColorString(255 0 0)

    axlSpreadsheetSetStyleProp("Fill" "Color" red)

    axlSpreadsheetSetStyleProp("Fill" "Pattern" "Solid")

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • iCraig
    iCraig over 9 years ago

    That works for a style. I'd like to modify the cell without having to create another style. Right now I have a dozen styles just to do different borders. Now if I want to have 4 colors to those dozen styles I end up with 48 styles. It's getting out of control.


    Thanks,

    Craig

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 9 years ago

    Ouch. Good luck with that!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DHung
    DHung over 9 years ago

    Hi eDave,

    Sorry for I posted this topic but my issue nearly this.

    I'm newer person. Can you detail  me how to set background for every cell in excel, example: blue for cell(1,1) yellow for cell(1,2) ?
    My code only set 1 color for every cell in my export excel file.

    Thank you very much.

    Hung

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 9 years ago

    You must get a new cell each time to do this. Look at the fgrid.il example code in share\pcb\examples\skill\form\grid.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
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