FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour imagelist on tree
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
imagelist on tree
Posted: Fri Sep 27, 2024 10:37 AM
I made

oImageList = TImageList():New()

oBmp1 := TBitmap():Define( "open",, oDlg )
oBmp2 := TBitmap():Define( "close",, oDlg)


@ 5, 1 TREEVIEW oTree OF oDlg SIZE 80, 80 COLOR 0, GetSysColor( 15 )
oTree:SetImageList( oImageList )



Why I not see the bmps ?

on resource
Code (fw): Select all Collapse
open  BITMAP "open.bmp"
close BITMAP "arrow.bmp"




#ifndef __64__
   1 24 ".\winxp\WindowsXP.Manifest"
#endif
#ifdef __64__
   1 24 "WinXP/WindowsXP.Manifest64"
#endif
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: imagelist on tree
Posted: Fri Sep 27, 2024 01:34 PM
Silvio.Falconi wrote:Why I not see the bmps ?

on resource
Code (fw): Select all Collapse
open  BITMAP "open.bmp"
close BITMAP "arrow.bmp"
try
Code (fw): Select all Collapse
open  10 "open.BMP"
close 10 "arrow.BMP"
greeting,

Jimmy
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: imagelist on tree
Posted: Fri Sep 27, 2024 02:38 PM
Jimmy wrote:
Why I not see the bmps ?

on resource
Code (fw): Select all Collapse
open  BITMAP "open.bmp"
close BITMAP "arrow.bmp"
try
Code (fw): Select all Collapse
open  10 "open.BMP"
close 10 "arrow.BMP"
no "10" is for PNG file
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: imagelist on tree
Posted: Fri Sep 27, 2024 02:53 PM
Samples,
Code (fw): Select all Collapse
elixir.prg
elixir.rc
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: imagelist on tree
Posted: Fri Sep 27, 2024 05:02 PM
hi Silvio,
Silvio.Falconi wrote:
Why I not see the bmps ?
on resource
Code (fw): Select all Collapse
open  BITMAP "open.bmp"
close BITMAP "arrow.bmp"
try
Code (fw): Select all Collapse
open  10 "open.BMP"
close 10 "arrow.BMP"
no "10" is for PNG file WRONG :!:
10 mean RC_DATA and i use it for Bitmap which else are not shown.
try it
greeting,

Jimmy
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: imagelist on tree
Posted: Fri Sep 27, 2024 05:36 PM
karinha wrote:Samples,
Code (fw): Select all Collapse
elixir.prg
elixir.rc
Regards, saludos.
Please Master Guru Moderatore Kharina ,
avoid answering with meaningless sentences
I don't have time to waste on your Brazilian games
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: imagelist on tree
Posted: Fri Sep 27, 2024 05:54 PM
No comments,
Code (fw): Select all Collapse
// C:\FWH\SAMPLES\ELIXIR.PRG

#include "FiveWin.ch"

STATIC oImageList

FUNCTION Main()

   LOCAL oDlg, oGet, cText := ""

   DEFINE DIALOG oDlg SIZE 900, 600

   @ 0, 100 GET oGet VAR cText MEMO SIZE 350, 300 PIXEL OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT BuildTree( oDlg, oGet )

   oImageList:End()

RETURN NIL

FUNCTION BuildTree( oDlg, oGet )

   LOCAL oTreeView := TTreeView():New( 0, 0, oDlg )
   LOCAL cPath := "c:\FWH1905\*", oItem

   oImageList := TImageList():New()

   oDlg:SetText( cPath )

   oTreeView:SetSize( 200, oDlg:nHeight - 30 )

   oTreeView:bChanged = {|| If( ( oItem := oTreeView:GetSelected() ) != nil, ;
      oGet:SetText( MemoRead( oItem:Cargo ) ), ) }

   oImageList:Add( TBitmap():Define( "folder",,  oDlg ), ;
      TBitmap():Define( "fldmask",, oDlg ) )

   oImageList:Add( TBitmap():Define( "prg",,  oDlg ), ;
      TBitmap():Define( "prgMask",,  oDlg ) )

   oTreeView:SetImageList( oImageList )

   ReadFiles( cPath, oTreeView )

RETURN NIL

FUNCTION ReadFiles( cPath, oTreeView )

   LOCAL aFiles := Directory( cPath, "D" )
   LOCAL oTreeItem, n

   FOR n = 1 TO Len( aFiles )
      IF aFiles[ n ][ 1 ] != "." .AND. aFiles[ n ][ 1 ] != ".."
         oTreeItem = oTreeView:Add( aFiles[ n ][ 1 ], If( aFiles[ n ][ 5 ] == "D", 0, 1 ) )
         IF aFiles[ n ][ 5 ] == "D"
            ReadFiles( SubStr( cPath, 1, RAt( "\", cPath ) ) + aFiles[ n ][ 1 ] + "\*", oTreeItem )
         ELSE
            oTreeItem:Cargo = SubStr( cPath, 1, RAt( "\", cPath ) ) + aFiles[ n ][ 1 ]
         ENDIF
      ENDIF
   NEXT

RETURN NIL

// FIN / END
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: imagelist on tree
Posted: Fri Sep 27, 2024 05:56 PM
// C:\FWH\SAMPLES\ELIXIR.RC
Code (fw): Select all Collapse
#ifndef __64__
  1 24 "WinXP/WindowsXP.Manifest" 
#endif

background BITMAP .\..\bitmaps\backgrnd\iosbg.bmp

New      BITMAP "../bitmaps/32x32/new.bmp"
New2     BITMAP "../bitmaps/16x16/new.bmp"
Dialog   BITMAP "../bitmaps/16x16/form.bmp"
DlgMask  BITMAP "../bitmaps/16x16/frmmask.bmp"
Open     BITMAP "../bitmaps/32x32/open.bmp"
Open2    BITMAP "../bitmaps/16x16/open.bmp"
Save     BITMAP "../bitmaps/32x32/floppy.bmp"
Run      BITMAP "../bitmaps/32x32/run.bmp"
Prg      BITMAP "../bitmaps/16x16/source.bmp"
PrgMask  BITMAP "../bitmaps/16x16/srcmask.bmp"
Exit2    BITMAP "../bitmaps/16x16/exit2.bmp"
includes BITMAP "../bitmaps/16x16/next.bmp"
bitmap   BITMAP "../bitmaps/16x16/bitmap.bmp"
bmpmask  BITMAP "../bitmaps/16x16/bmpmask.bmp"
icon     BITMAP "../bitmaps/16x16/icon.bmp"
icomask  BITMAP "../bitmaps/16x16/icomask.bmp"
folder   BITMAP "../bitmaps/16x16/folder.bmp"
fldmask  BITMAP "../bitmaps/16x16/fldmask.bmp"
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: imagelist on tree
Posted: Fri Sep 27, 2024 09:00 PM
karinha wrote:// C:\FWH\SAMPLES\ELIXIR.RC
Code (fw): Select all Collapse
#ifndef __64__
  1 24 "WinXP/WindowsXP.Manifest" 
#endif

background BITMAP .\..\bitmaps\backgrnd\iosbg.bmp

New      BITMAP "../bitmaps/32x32/new.bmp"
New2     BITMAP "../bitmaps/16x16/new.bmp"
Dialog   BITMAP "../bitmaps/16x16/form.bmp"
DlgMask  BITMAP "../bitmaps/16x16/frmmask.bmp"
Open     BITMAP "../bitmaps/32x32/open.bmp"
Open2    BITMAP "../bitmaps/16x16/open.bmp"
Save     BITMAP "../bitmaps/32x32/floppy.bmp"
Run      BITMAP "../bitmaps/32x32/run.bmp"
Prg      BITMAP "../bitmaps/16x16/source.bmp"
PrgMask  BITMAP "../bitmaps/16x16/srcmask.bmp"
Exit2    BITMAP "../bitmaps/16x16/exit2.bmp"
includes BITMAP "../bitmaps/16x16/next.bmp"
bitmap   BITMAP "../bitmaps/16x16/bitmap.bmp"
bmpmask  BITMAP "../bitmaps/16x16/bmpmask.bmp"
icon     BITMAP "../bitmaps/16x16/icon.bmp"
icomask  BITMAP "../bitmaps/16x16/icomask.bmp"
folder   BITMAP "../bitmaps/16x16/folder.bmp"
fldmask  BITMAP "../bitmaps/16x16/fldmask.bmp"
Regards, saludos.
Sorry but what i wrote ?
I compiled a fwh samples test and not run ok

given what happened in another topic avoid replying to my messages, I can not compare myself with you who are a master Guru Expert of fivewin
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: imagelist on tree
Posted: Sat Sep 28, 2024 08:57 AM
karinha wrote:No comments,
Code (fw): Select all Collapse
// C:\FWH\SAMPLES\ELIXIR.PRG

#include "FiveWin.ch"

STATIC oImageList

FUNCTION Main()

   LOCAL oDlg, oGet, cText := ""

   DEFINE DIALOG oDlg SIZE 900, 600

   @ 0, 100 GET oGet VAR cText MEMO SIZE 350, 300 PIXEL OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT BuildTree( oDlg, oGet )

   oImageList:End()

RETURN NIL

FUNCTION BuildTree( oDlg, oGet )

   LOCAL oTreeView := TTreeView():New( 0, 0, oDlg )
   LOCAL cPath := "c:\FWH1905\*", oItem

   oImageList := TImageList():New()

   oDlg:SetText( cPath )

   oTreeView:SetSize( 200, oDlg:nHeight - 30 )

   oTreeView:bChanged = {|| If( ( oItem := oTreeView:GetSelected() ) != nil, ;
      oGet:SetText( MemoRead( oItem:Cargo ) ), ) }

   oImageList:Add( TBitmap():Define( "folder",,  oDlg ), ;
      TBitmap():Define( "fldmask",, oDlg ) )

   oImageList:Add( TBitmap():Define( "prg",,  oDlg ), ;
      TBitmap():Define( "prgMask",,  oDlg ) )

   oTreeView:SetImageList( oImageList )

   ReadFiles( cPath, oTreeView )

RETURN NIL

FUNCTION ReadFiles( cPath, oTreeView )

   LOCAL aFiles := Directory( cPath, "D" )
   LOCAL oTreeItem, n

   FOR n = 1 TO Len( aFiles )
      IF aFiles[ n ][ 1 ] != "." .AND. aFiles[ n ][ 1 ] != ".."
         oTreeItem = oTreeView:Add( aFiles[ n ][ 1 ], If( aFiles[ n ][ 5 ] == "D", 0, 1 ) )
         IF aFiles[ n ][ 5 ] == "D"
            ReadFiles( SubStr( cPath, 1, RAt( "\", cPath ) ) + aFiles[ n ][ 1 ] + "\*", oTreeItem )
         ELSE
            oTreeItem:Cargo = SubStr( cPath, 1, RAt( "\", cPath ) ) + aFiles[ n ][ 1 ]
         ENDIF
      ENDIF
   NEXT

RETURN NIL

// FIN / END
Regards, Saludos.
Dear Karinha,
I just to build it and not work. See picture.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 137
Joined: Mon Oct 22, 2012 04:43 PM
Re: imagelist on tree
Posted: Sat Sep 28, 2024 09:32 AM
There must be an existing directory instead of c:\fwh1905\*
Code (fw): Select all Collapse
LOCAL cPath := "c:\FWH1905\*", oItem
Regards



Ing. Anton Lerchster
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: imagelist on tree
Posted: Sat Sep 28, 2024 01:02 PM
alerchster wrote:There must be an existing directory instead of c:\fwh1905\*
Code (fw): Select all Collapse
LOCAL cPath := "c:\FWH1905\*", oItem
Very good Anton Lerchster, I thought no one would notice! hahaha, thanks. You are very intelligent.

Gracias, tks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: imagelist on tree
Posted: Sat Sep 28, 2024 03:15 PM
More humanized version of ELIXIR.PRG

Versión más humanizada de ELIXIR.PRG
Code (fw): Select all Collapse
// C:\FWH\SAMPLES\ELIXIR.PRG - NEW VRSION - 28/09/2024 - Mod: by Kapiaba.

#include "FiveWin.ch"

STATIC oImageList, cPath, lOk := .F., lExit := .F.

FUNCTION Main()

   LOCAL oDlg, oGet, cText := "", oFont, oFnt

   SkinButtons() // COLOR IN BUTTONS

   DEFINE FONT oFnt  NAME "Ms Sans Serif" SIZE 0,  14 BOLD
   DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -14 BOLD

   DEFINE DIALOG oDlg SIZE 1000, 800 FONT oFont

   oDlg:lHelpIcon := .F.
                                      // 350, 300
   @ 0, 100 GET oGet VAR cText MEMO SIZE 395, 350 PIXEL OF oDlg FONT oFont

   ACTIVATE DIALOG oDlg ; // CENTERED ;
      ON INIT Choice_Image( oDlg, oGet )

   // ON INIT BuildTree( oDlg, oGet ) // OLD Version.

   oFont:End()
   oFnt:End()

   lExit := .F.

   IF .NOT. EMPTY( oImageList )

      oImageList:End()

   ENDIF

RETURN NIL

FUNCTION Choice_Image( oDlg, oGet )

   LOCAL oDlgC, oDir, oOk, cDir := "C:\FWH1905" // Space( 256 ) -> A tu gusto!
   LOCAL oFont, oFnt, oExit, oSel

   DEFINE FONT oFnt  NAME "Ms Sans Serif" SIZE 0,  14 BOLD
   DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -14 BOLD

   DEFINE DIALOG oDlgC SIZE 400, 200 PIXEL TRANSPARENT FONT oFont            ;
      TITLE "Choice Directory Of Images For Tree" COLOR CLR_BLACK, CLR_WHITE

   oDlgC:lHelpIcon := .F.

   @ 12, 5 SAY "Directory:" OF oDlgC SIZE 60, 12 PIXEL TRANSPARENT UPDATE    ;
      FONT oFont COLOR METRO_ORANGE, CLR_WHITE

   @ 10, 45 GET oDir VAR cDir OF oDlgC SIZE 100, 12 PIXEL UPDATE FONT oFont

   @ 38.50, 5 SAY "New Version: Choice Directory Of Images For Tree" OF oDlgC   ;
      SIZE 200, 12 PIXEL TRANSPARENT UPDATE FONT oFont                       ;
      COLOR METRO_CRIMSON, CLR_WHITE

   @ 10, 150 BUTTONBMP oSel PROMPT "&Sel" SIZE 35, 12 PIXEL OF oDlgC         ;
      BITMAP "..\bitmaps\16x16\floppy.bmp" TEXTRIGHT                         ;
      ACTION SelDir( oDlgC, oDir, @cDir )

   @ 60, 45 BUTTONBMP oOk PROMPT "&Ok" SIZE 50, 14 PIXEL OF oDlgC            ;
      BITMAP "..\bitmaps\16x16\open.bmp" TEXTRIGHT                           ;
      ACTION( BuildTree( oDlg, oGet, lExit := .T., oDlgc:End() ) ) WHEN( lOk )

   @ 60, 100 BUTTONBMP oExit PROMPT "&Exit" SIZE 50, 14 PIXEL OF oDlgC       ;
      BITMAP "..\bitmaps\16x16\Exit.bmp" TEXTRIGHT                           ;
      ACTION( lExit := .T., oDlgc:End(), __QUIT() ) CANCEL

   ACTIVATE DIALOG oDlgC CENTERED VALID( lExit )

   oFont:End()
   oFnt:End()

   lExit := .F.

RETURN NIL

FUNCTION SelDir( oDlgC, oDir, cDir )

   LOCAL cTitle  := "Choice Directory Of Images"
   LOCAL cInitDir := cDir
   LOCAL cTmpDir := AllTrim( cGetDir( cTitle, cInitDir ) )

   IF .NOT. EMPTY( cTmpDir )

      cDir  := cTmpDir

      cPath := cDir+"\*"  // aqui el truco.

      lOk   := .T. // Button "Ok" Action

      oDlgC:UpDate()

   ELSE

      MsgInfo( "CHOOSE A VALID DIRECTORY TO GET THE IMAGES FROM THE TREE.", ;
               "CHOOSE A VALID DIRECTORY TO GET THE IMAGES FROM THE TREE." )

   ENDIF

RETURN NIL

FUNCTION BuildTree( oDlg, oGet )

   LOCAL oTreeView := TTreeView():New( 0, 0, oDlg )
   // LOCAL cPath := "c:\FWH1905\*", oItem // OLD VERSION
   LOCAL oItem

   oImageList := TImageList():New()

   oDlg:SetText( cPath )

   oTreeView:SetSIZE( 200, oDlg:nHeight - 30 )

   oTreeView:bChanged = {|| If( ( oItem := oTreeView:GetSelected() ) != nil, ;
      oGet:SetText( MemoRead( oItem:Cargo ) ), ) }

   oImageList:Add( TBitmap():Define( "folder",,  oDlg ), ;
      TBitmap():Define( "fldmask",, oDlg ) )

   oImageList:Add( TBitmap():Define( "prg",,  oDlg ), ;
      TBitmap():Define( "prgMask",,  oDlg ) )

   oTreeView:SetImageList( oImageList )

   ReadFiles( cPath, oTreeView )

RETURN NIL

FUNCTION ReadFiles( cPath, oTreeView )

   LOCAL aFiles := Directory( cPath, "D" )
   LOCAL oTreeItem, n

   FOR n = 1 TO Len( aFiles )
      IF aFiles[ n ][ 1 ] != "." .AND. aFiles[ n ][ 1 ] != ".."
         oTreeItem = oTreeView:Add( aFiles[ n ][ 1 ], If( aFiles[ n ][ 5 ] == "D", 0, 1 ) )
         IF aFiles[ n ][ 5 ] == "D"
            ReadFiles( SubStr( cPath, 1, RAt( "\", cPath ) ) + aFiles[ n ][ 1 ] + "\*", oTreeItem )
         ELSE
            oTreeItem:Cargo = SubStr( cPath, 1, RAt( "\", cPath ) ) + aFiles[ n ][ 1 ]
         ENDIF
      ENDIF
   NEXT

RETURN NIL

// FIN / END - kapiabafwh@gmail.com
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: imagelist on tree
Posted: Sat Sep 28, 2024 04:24 PM
alerchster wrote:There must be an existing directory instead of c:\fwh1905\*
Code (fw): Select all Collapse
LOCAL cPath := "c:\FWH1905\*", oItem
WoW... Old folder, so old sample file. Define Folder c:\harbour ...
Now, it's working.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: imagelist on tree
Posted: Mon Sep 30, 2024 06:25 AM
richard-service wrote:
There must be an existing directory instead of c:\fwh1905\*
Code (fw): Select all Collapse
LOCAL cPath := "c:\FWH1905\*", oItem
WoW... Old folder, so old sample file. Define Folder c:\harbour ...
Now, it's working.
Jimmy wrote:hi Silvio,

10 mean RC_DATA and i use it for Bitmap which else are not shown.
try it
Friends,
Mr. Brazilian Moderator Guru Expert Kharina invents tests that I have not tried.....

I mean this sample :

the test
Code (fw): Select all Collapse
#include "fivewin.ch"
#include "constant.ch"


Function test()
     local  oDlg,oBar,oBar2,oFont,oBold,oLbx
     local  nBottom   := 35
     local  nRight    := 90
     local  nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
     local  nHeight := nBottom * DLG_CHARPIX_H
     local cTitle:= "test"
     local oBtnConfirm,oBtnClose,oBtnAiuto
     local nClrText := CLR_BLACK

 DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0, 12
     DEFINE FONT oBold NAME "MS Sans Serif" SIZE 0, 12 BOLD


     DEFINE DIALOG  oDlg ;
      SIZE nWidth, nHeight  PIXEL  ;
      TITLE cTitle  RESIZABLE

  @ 100,10 BUTTON oBtnConfirm PROMPT "Conferma" of oDlg SIZE 45,15 DEFAULT ACTION (oDlg:end( IDOK  ) )
      @ 100,10 BUTTON oBtnClose PROMPT "Annulla" of oDlg  SIZE 45,15 CANCEL ACTION ( oDlg:end( IDCANCEL ) )
      @ 100,10 BUTTON oBtnAiuto PROMPT "Aiuto" of oDlg  SIZE 45,15 CANCEL ACTION NIL

      oDlg:bResized  := <||
             local oRect        := oDlg:GetCliRect()
                oBtnConfirm:nTop   := oRect:nBottom - 40
                oBtnConfirm:nLeft  := oRect:nRight - 310
                oBtnClose:nTop     := oRect:nBottom - 40
                oBtnClose:nLeft    := oRect:nRight - 210
                oBtnAiuto:nTop     := oRect:nBottom - 40
                oBtnAiuto:nLeft    := oRect:nRight - 110

        return nil
        >
ACTIVATE DIALOG oDlg CENTER;
   ON INIT  (AddItems( oBar2 ),eval(oDlg:bResized))
 oImageList:End()
RETURN NIL


 function AddItems(oBar2,oDlg )

   local oItem1, oItem2, oItem3,oItem4,oItem5
   local oImageList := TImageList():New()
   local oTree, oBmp1,oBmp2

      oBmp1 := TBitmap():Define( "open",, oBar2 )
      oBmp2 := TBitmap():Define( "close",, oBar2)


   @ 15, 1 TREEVIEW oTree OF oBar2 SIZE 190, 180
         oTree:SetImageList( oImageList )


   oItem1 = oTree:Add( "Estratti" )
   oItem1:Add( "Numeri dispari" )
   oItem1:Add( "Numeri Fibonacci" )
   oItem1:Add( "Numeri pari tutti" )
   oItem1:Add( "Numeri primi" )
   oItem1:Add( "Numeri tutti" )
   oItem2 = oTree:Add( "Ambi" )
   oItem2:Add( "Ambi al quadrato" )
   oItem2:Add( "World" )
   oItem3 = oTree:Add( "Terzine" )
   oItem3:Add( "Last" )
   oItem3:Add( "item" )
   oItem4 = oTree:Add( "Quartine" )
   oItem4:Add( "Last" )
   oItem4:Add( "item" )
return oTree


oBar 2 is another class I cannot publish it here but it is as a vertical status bar you can see on figure



rc file
Code (fw): Select all Collapse
open  BITMAP "open.bmp"
close BITMAP "arrow.bmp"




#ifndef __64__
   1 24 ".\winxp\WindowsXP.Manifest"
#endif
#ifdef __64__
   1 24 "WinXP/WindowsXP.Manifest64"
#endif
I saw the same test on fwh\sample testtre2.prg anf I copied it

please don't listen and read what Kharina writes, we are tired of her meaningless messages and she often makes me waste time with his "not helping"
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com