Method AddColumns - what is wrong?

Started by Zibster, July 04, 2008, 03:57:08 AM

Previous topic - Next topic

Zibster

I have problem with GridControl.
Inteliigent Help:

AutoLISP Syntax:
(dcl_Grid_AddColumns bik_Siatki_frmSiatki_gridStand
   (list (list 
   sColText [as String]
   Optional nJustification [as Integer]
   Optional nColWidth [as Integer]
   Optional nImageListIndex [as Integer])
...))

In my code:

(dcl_Grid_AddColumns bik_Siatki_frmSiatki_gridStand
      (list  (list 0  "Lp" 1 30)
        (list 2  (nth 0 lstNaglowki) 1 50)
        (list 3  (nth 1 lstNaglowki) 1 40)
        (list 4  (nth 2 lstNaglowki) 1 40)
        (list 5  (nth 3 lstNaglowki) 1 40)
        (list 6  (nth 4 lstNaglowki) 1 40)
        (list 7  (nth 5 lstNaglowki) 1 40)
            )
)

My list lstNaglowki:
(setq lstNaglowki (list "Typ" "Długość [m]" "Szerokość [m]" "Rozstaw wzdłużny [mm]" "Rozstaw poprzeczny [mm]" "Wysięg przód [mm]" "Wysięg prawy [mm]" ))

what is wrong?
When I used ver. 4.0.2 all was okey,
now I have 5.0.0.18 and ... --> attach

Zbyszek

owenwengerd

Look carefully at the Intelligent Help for AddColumns.  Notice that the column index argument has been removed.  Just remove the first item in each sublist, and make sure you add columns sequentially, then your code should work.