Home > Community > Forums > PCB SKILL > String size for grid

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: *

 String size for grid 

Last post Tue, Sep 24 2013 6:24 PM by D912349. 4 replies.
Started by D912349 22 Sep 2013 08:19 PM. Topic has 4 replies and 2580 views
Page 1 of 1 (5 items)
Sort Posts:
  • Sun, Sep 22 2013 8:19 PM

    • D912349
    • Top 150 Contributor
    • Joined on Fri, Nov 23 2012
    • Posts 47
    • Points 800
    String size for grid Reply

     Hi,

     

    Anyone knows how to extend size/number characters for fieldtype STRING at grids?. default size is limited to 16 characters. 

    Thanks!

    • Post Points: 20
  • Mon, Sep 23 2013 4:28 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: String size for grid Reply

    I Don't see this restriction. I tired with "->colWidth = 25" and it worked fine (in 16.6).

     


    Dave Elder, Tait Communications
    • Post Points: 20
  • Mon, Sep 23 2013 6:19 PM

    • D912349
    • Top 150 Contributor
    • Joined on Fri, Nov 23 2012
    • Posts 47
    • Points 800
    Re: String size for grid Reply

     If I set colWidth to 25, the field only widens but number of characters is still restricted to 16. I am not sure, but is thier something to do with the fieldType? the fieldType that I use is "STRING.

    • Post Points: 20
  • Tue, Sep 24 2013 5:09 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 295
    • Points 4,705
    Re: String size for grid Reply

    You want the fieldLength parameter of the formGridCol defstruct used with axlFormGridInsertCol.

    Example (for more complete example see <cdsroot>/share/pcb/examples/skill/form/grid) :

    p = make_formGridCol()

    p->fieldType = 'STRING

    p->colWidth = 0    ; autosize visible column width

    p->fieldLength  = 32  ; maximum length of string permitted

    axlFormGridInsertCol(fw "grid" p)

    • Post Points: 20
  • Tue, Sep 24 2013 6:24 PM

    • D912349
    • Top 150 Contributor
    • Joined on Fri, Nov 23 2012
    • Posts 47
    • Points 800
    Re: String size for grid Reply

    Code works!

    Thanks.

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by D912349 at 22 Sep 2013 08:19 PM. Topic has 4 replies.