imagelist on tree

imagelist on tree

Postby Silvio.Falconi » 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 )

Image

Why I not see the bmps ?

on resource

Code: Select all  Expand view  RUN
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Re: imagelist on tree

Postby Jimmy » Fri Sep 27, 2024 1:34 pm

Silvio.Falconi wrote:Why I not see the bmps ?

on resource
Code: Select all  Expand view  RUN
open  BITMAP "open.bmp"
close BITMAP "arrow.bmp"
 

try
Code: Select all  Expand view  RUN
open  10 "open.BMP"
close 10 "arrow.BMP"
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: imagelist on tree

Postby Silvio.Falconi » Fri Sep 27, 2024 2:38 pm

Jimmy wrote:
Silvio.Falconi wrote:Why I not see the bmps ?

on resource
Code: Select all  Expand view  RUN
open  BITMAP "open.bmp"
close BITMAP "arrow.bmp"
 

try
Code: Select all  Expand view  RUN
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Re: imagelist on tree

Postby karinha » Fri Sep 27, 2024 2:53 pm

Samples,

Code: Select all  Expand view  RUN

elixir.prg
elixir.rc
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: imagelist on tree

Postby Jimmy » Fri Sep 27, 2024 5:02 pm

hi Silvio,
Silvio.Falconi wrote:
Jimmy wrote:
Silvio.Falconi wrote:Why I not see the bmps ?
on resource
Code: Select all  Expand view  RUN
open  BITMAP "open.bmp"
close BITMAP "arrow.bmp"
 

try
Code: Select all  Expand view  RUN
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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: imagelist on tree

Postby Silvio.Falconi » Fri Sep 27, 2024 5:36 pm

karinha wrote:Samples,

Code: Select all  Expand view  RUN

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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Re: imagelist on tree

Postby karinha » Fri Sep 27, 2024 5:54 pm

No comments,

Code: Select all  Expand view  RUN

// 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
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: imagelist on tree

Postby karinha » Fri Sep 27, 2024 5:56 pm

// C:\FWH\SAMPLES\ELIXIR.RC

Code: Select all  Expand view  RUN

#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
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: imagelist on tree

Postby Silvio.Falconi » Fri Sep 27, 2024 9:00 pm

karinha wrote:// C:\FWH\SAMPLES\ELIXIR.RC

Code: Select all  Expand view  RUN

#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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Re: imagelist on tree

Postby richard-service » Sat Sep 28, 2024 8:57 am

karinha wrote:No comments,

Code: Select all  Expand view  RUN

// 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.
Image
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: imagelist on tree

Postby alerchster » Sat Sep 28, 2024 9:32 am

There must be an existing directory instead of c:\fwh1905\*
Code: Select all  Expand view  RUN
LOCAL cPath := "c:\FWH1905\*", oItem
Regards

Ing. Anton Lerchster
User avatar
alerchster
 
Posts: 93
Joined: Mon Oct 22, 2012 4:43 pm

Re: imagelist on tree

Postby karinha » Sat Sep 28, 2024 1:02 pm

alerchster wrote:There must be an existing directory instead of c:\fwh1905\*
Code: Select all  Expand view  RUN
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
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: imagelist on tree

Postby karinha » Sat Sep 28, 2024 3:15 pm

More humanized version of ELIXIR.PRG

Versión más humanizada de ELIXIR.PRG

Code: Select all  Expand view  RUN

// 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
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: imagelist on tree

Postby richard-service » Sat Sep 28, 2024 4:24 pm

alerchster wrote:There must be an existing directory instead of c:\fwh1905\*
Code: Select all  Expand view  RUN
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 (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: imagelist on tree

Postby Silvio.Falconi » Mon Sep 30, 2024 6:25 am

richard-service wrote:
alerchster wrote:There must be an existing directory instead of c:\fwh1905\*
Code: Select all  Expand view  RUN
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: Select all  Expand view  RUN

#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: Select all  Expand view  RUN
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests