Home > Community > Forums > PCB SKILL > s_backColor with grid cells

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 s_backColor with grid cells 

Last post Mon, Apr 29 2013 10:14 PM by Ejlersen. 4 replies.
Started by Ejlersen 29 Apr 2013 08:53 AM. Topic has 4 replies and 881 views
Page 1 of 1 (5 items)
Sort Posts:
  • Mon, Apr 29 2013 8:53 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 10,080
    s_backColor with grid cells Reply

    Hi

    How can a background color for grid cells be set to anything apart from the standard colors shown in the documentation.

    I've seen this done in grid cell based forms and have so far not been able to figure this out.

    It works for setting cell->backColor to 'green, 'black, 'white etc. but I would like to use rgb or color palette numbers

    Anyone know the secret to this?

    Best regards

    Ole

    Best regards Ole
    • Post Points: 20
  • Mon, Apr 29 2013 9:04 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 296
    • Points 4,710
    Re: s_backColor with grid cells Reply

     see the example code in <cdsroot>/share/pcb/examples/skill/form

     the files are fgrid.il/fgrid.form

    load fgrid,il and then type gridtest

    • Post Points: 20
  • Mon, Apr 29 2013 9:36 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 10,080
    Re: s_backColor with grid cells Reply

    Hi

    Thats the example I've been looking at,but it does not show using rgb color codes for setting the background color of a cell.

    I've tried cell->backColor = '(100 100 100) without any luck, I've also tried passing color palette results with no luck

    I've tried on 16.6s006 and 16.6s008

    Best regards

    Ole

    Best regards Ole
    • Post Points: 20
  • Mon, Apr 29 2013 11:00 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 296
    • Points 4,710
    Re: s_backColor with grid cells Reply

    Grid color supports a set of predefined colors (e.g. 'yellow 'red 'green etc) or Allegro design colors. Allegro design colors require the allegro color number which corrosponds to a rgb value stored in the Allegro database (see axlFormColorize  and axlColorDoc for more info). It doesn't support the ability to assign abitrary rgb values to a cell.

    • Post Points: 20
  • Mon, Apr 29 2013 10:14 PM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 10,080
    Re: s_backColor with grid cells Reply

    Hi

    Yes, you're correct - it works with the 'background option on colorize - thanks for pointing me in the correct direction for doing this when initializing the form instead of when I created the cells.

    Best regards

    Ole

    Best regards Ole
    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by Ejlersen at 29 Apr 2013 08:53 AM. Topic has 4 replies.