OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: colder on November 16, 2007, 05:07:48 PM

Title: [Need some help] About "AutoCAD Colors List" in grib
Post by: colder on November 16, 2007, 05:07:48 PM
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?
Title: Re: [Need some help] About "AutoCAD Colors List" in grib
Post by: owenwengerd on November 20, 2007, 05:43:54 PM
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.