[Need some help] About "AutoCAD Colors List" in grib

Started by colder, November 16, 2007, 05:07:48 PM

Previous topic - Next topic

colder

ver: 4.1.1.5 beta

In "Grib". When I set columns style as "AutoCAD Colors List". I choose color like "123", and then use "dcl_Grid_GetRowItems". The return value is "Color 123"

But, how can I use "dcl_Grid_AddRow" to set that value?

owenwengerd

In this case, you have to do three things:
1) Add the cell, with the correct text.
2) Add your custom color to the color list.
3) Set the image index of the cell tot he index of the color in the list.

For 2, you'll have to find the registry key where AutoCAD saves custom colors for the color listbox and add your custom color to the list. For 3, you have to call (dcl_Grid_SetItemImage) to set the zero-based index of the color in the list.
Owen Wengerd (Outside The Box) / ManuSoft