The dcl_Grid_SetItemDropList
Testing in OpenDCL Alpha 5.0.0.3
; set the new grid cell style.
(dcl_Grid_SetItemStyle UpDateGrid_Form9_Grid3 nRow 1 29);0
; set the drop list
(dcl_Grid_SetItemDropList UpDateGrid_Form9_Grid3 nRow 1 (list "A-Elev" "A-Sect" ));Works for strings
(dcl_Grid_SetItemDropList UpDateGrid_Form9_Grid3 nRow 1 (list "A-Elev" 2 "A-Sect" 2 ));Icon nor strings are displayed
Can someone help please
hgcad
Double click on a grid control in OpenDCL Studio and look at the entry for SetItemDropList. That function expects two lists, which I think is a change from OpenDCL 4.
Owen I followed your advise and it worked pretty good except in one case as below:
(dcl_Grid_SetItemDropList odcl-nam nRow 1 (mapcar 'strcat List1) iList1);this worked for the most part
(dcl_Grid_SetItemDropList odcl-nam nRow 1 (mapcar 'strcat List1) 0 0 0 1);I had to do this in one case to get it to work
Seem to be an inconsistancy, please check and confirm.
BTW I like the enhansments to the Editor , good Work keep it up.
Thanks,
Hgcad
Quote from: hgcad on February 07, 2008, 02:36:15 PM
Seem to be an inconsistancy, please check and confirm.
In the examples you show, (mapcar 'strcat ...) is not producing a list of strings, so it will only be adding a single item to the list. There was a problem where a list of two or three integers for the image list could result in an argument exception because it was passed as a point instead of a list, but I've fixed that for Alpha 4.
I should also mention that the argument processing code will accept either a list of integers or strings, or a series of integers or strings. That is, (dcl_grid_setitemdropdownlist <control> <row> <column> "Item1" "Item2" "Item 3" "Item 4" 1 2 3 4) is interpreted the same way as (dcl_grid_setitemdropdownlist <control> <row> <column> '("Item1" "Item2" "Item3" "Item4") '(1 2 3 4)).
I suspect that you encountered the problem with three integers being passed as a point, and your second example solved the problem because the integers were no longer in a separate list.
If this is not the case, please post an example that fails.
There was a problem where a list of two or three integers for the image list could result in an argument exception because it was passed as a point instead of a list:
Tested your examples, they both work.
It was a case where I used 2 and 3 images that were the same causing the error.
Solved this one for me.
Thanks,
Hgcad