Thanks Dan.
Here's how to do the full setup at initialisation using (dcl_Grid_FillList .....
;; NOTE: The quantity of DesignTime Columns must match or exceed the runtime column count
Firstly the Resize Event Handler
This version keeps the Field Column the same size and proportionally allocates width to the remaining columns.
(defun c:pprops_F_OnSize (nWidth nHeight / keywidth)
(setq KeyWidth 70
nWidth (fix (/ (- nWidth 24 KeyWidth) 5.0))
)
(dcl_grid_setColumnWidth pprops_F_grd 0 KeyWidth)
(dcl_grid_setColumnWidth pprops_F_grd 1 (* 2 nWidth))
(dcl_grid_setColumnWidth pprops_F_grd 2 nWidth)
(dcl_grid_setColumnWidth pprops_F_grd 3 (* 2 nWidth))
)
Now the initialisation :
(defun c:pprops_F_OnInitialize (/ nRow)
;; NOTE: The quantity of strings in the List MUST be equal
;;or less than DesignTime Column quantity
(dcl_control_setColumnWidthList pprops_F_grd (list 70 40 20 20))
(dcl_control_setColumnCaptionList pprops_F_grd (list "Field" "Name" "Hide" "Color"))
;;
;; assume initially each column is the same 'Style'
;; ie each Row column 3 is style 31 <Truecolor>
(dcl_control_setColumnStyleList pprops_F_grd (list 0 0 1 31))
;;
;;
(dcl_Grid_FillList pprops_F_grd
(list
(list "Row1 Field"
"Row1 Name"
""
"212,119" )
(list "Row2 Field"
"Row2 Name"
""
"56,168,105" )
(list "Row3 Field"
"Row3 Name"
""
"55,70,169" )
)
)
;; NOW, set the Option Toggles
(foreach nRow '( 0 2)
;; toggle on for nominated row
(dcl_grid_setcellcheckstate pprops_F_grd nRow 2 1)
)
)
and the Piccy Attachment of the Pallete immediately after initialisation: