Can anyone provide an example of the usage of Image List?

Started by sysuwzx, August 05, 2025, 02:19:28 AM

Previous topic - Next topic

sysuwzx

Hello, recently I come across the problem about Image List in OpenDCL.
In OpenDCL help, Image List is defined with " Image lists are Windows system objects for holding an ordered list of icons, and they are represented by handles in Windows. OpenDCL encodes image list handles as entity names when returning them to AutoLISP. These values are not really entity names, but they can be passed to OpenDCL functions that expect an image list, and OpenDCL will interpret them correctly as image list handles. Use the Image List methods to manage image lists."

Can anyone provide an example of the usage of Image List in Grid Control? I have search the internet and found nothing about it, and i search with the popular ai search engineer and the ai-generated code did not work.

Thanks in advance~

owenwengerd

The Grid sample (in the language/Samples subfolder of your OpenDCL Studio installation) uses an image list.
Owen Wengerd (Outside The Box) / ManuSoft

sysuwzx

Quote from: owenwengerd on August 05, 2025, 07:10:12 PMThe Grid sample (in the language/Samples subfolder of your OpenDCL Studio installation) uses an image list.

Hello~owenwengerd
Following your lead i find the following code
(setq ImageComboBoxList (list '("---" 100) '("Star" 0) '("Feet" 1) '("Hand" 2) '("Moon" 3)))

and there's the questions that
��  how to know the icon with index from 4 to 100 and even more?
���How to build my own icon in image list? 
���How to use the icons that are just like distributed internally with the Common Controls (such as the small arrows, plus and minus signs used by Toolbar, TreeView, and PropertySheet, etc.)

sysuwzx

O i finally make it...
Just need to look into the property of the Grid Control, as the attachment image shows.