under GRID you will find
to use Image in GRID you need Image as File or Resource and assign it with ImageIndex ( zero-based )- <ParentWindowName>.<GridControlName>.Image ( lTransparent ) := { "image1.png", "image2.bmp", ... }
- <ParentWindowName>.<GridControlName>.ImageIndex ( nRow , nCol ) [ := | -->] nIndex
- <ParentWindowName>.<GridControlName>.ImageList [ := | -->] hImageList
Code: Select all
Win_1.Grid_Device.Image( .T. ) := acImage
FOR i = 1 TO Win_1.Grid_Device.ItemCount
Win_1.Grid_Device.ImageIndex( i, 1 ) := i - 1
NEXT
---
Explorer show System Icon
in c:\hmg.3.4.4\SOURCE\BosTaurus\c_BosTaurus.c there are some HB_FUNC()
Code: Select all
// BT_ImageListGetSystemIcon ( [ lLargeIcon ] ) --> hImageList ( You NEVER add, remove or delete icons from the System Imagelist )
hImageList := BT_IMAGELISTGETSYSTEMICON()
// BT_DirectoryInfo ( [nCSIDL|cPath] , [nTypeList] , @nIndexRoot, @CSIDL_Name ) --> { { Data1, Data2, Data3, ... } , ... }
aInfoDir := BT_DIRECTORYINFO( "c:\hmg.3.4.4\0\HBFM", BT_DIRECTORYINFO_INTERNALDATA_IMAGEINDEX+BT_DIRECTORYINFO_LISTALL, @nIndexRoot )
// BT_ImageListExtractIcon(himl, nIndex)
hIcon := BT_IMAGELISTEXTRACTICON(hImageList,190)
last Element "seem" the "Icon Number" PRG = 190
---
my try
Code: Select all
@ nRow, nCol GRID &cObj ;
PARENT &cForm ;
...
SetProperty( cForm, cObj, "PaintDoubleBuffer", .T. )
SetProperty (cForm, cObj,"ImageList", hImageList )
Code: Select all
aInfoDir := BT_DIRECTORYINFO(cNewPath, BT_DIRECTORYINFO_INTERNALDATA_IMAGEINDEX+BT_DIRECTORYINFO_LISTALL, @nIndexRoot )
iMax := LEN(aInfoDir)
i := 1
FOR i := 1 TO iMax
cSeek := TRIM(aInfoDir[ i ][ F_NAME ])
nIco := aInfoDir[ i ][ 8 ]
nPosi := ASCAN( aNewDir, { | x | x[ F_NAME ] = cSeek } )
IF nPosi > 0
DO CASE
CASE cForm = "WinLeft"
SetProperty( "WinLeft" , cObj, "ImageIndex",i,1,nIco)
CASE cForm = "WinRight"
SetProperty( "WinRight", cObj, "ImageIndex",i,1,nIco)
* hIcon := BT_IMAGELISTEXTRACTICON(hImageList,nIco)
* SetProperty( "WinRight", cObj, "ImageIndex",i,1,hIcon)
ENDCASE
ENDIF
NEXT
i also try to use hIcon but it does not help
do i need to create my own Imagelist and add those hIcon
i "think" those Icon are in System-Imagelist or ...