how to "Set" Image on TFolderEx() ?

how to "Set" Image on TFolderEx() ?

Postby Jimmy » Fri May 19, 2023 5:40 pm

hi,

my App often crash at Start when "Set" Image on TFolderEx() :?:
it does fail on "destroy" Image of TFolderEx() ...

Called from (b)ERRORSYS(24) in .\source\function\ERRSYSW.PRG
Called from (b)FWDELRESOURCE(36) in .\source\function\CHECKRES.PRG
Called from ASCAN(0)
Called from FWDELRESOURCE(36) in .\source\function\CHECKRES.PRG
Called from DELETEOBJECT(0)
Called from GRADIENTBRUSH(815) in .\source\classes\BRUSH.PRG
Called from TFOLDEREX:SETFLDCOLORS(1695) in .\source\classes\TFOLDEX.PRG
Called from (b)TFOLDEREX_NEW(214) in .\source\classes\TFOLDEX.PRG
Called from TFOLDEREX:PAINTTB(1477) in .\source\classes\TFOLDEX.PRG
Called from TFOLDEREX:PAINT(1202) in .\source\classes\TFOLDEX.PRG
Called from (b)TFOLDEREX(121) in .\source\classes\TFOLDEX.PRG
Called from TFOLDEREX:DISPLAY(0) in .\source\classes\TFOLDEX.PRG
Called from TCONTROL:HANDLEEVENT(1823) in .\source\classes\CONTROL.PRG
Called from TFOLDEREX:HANDLEEVENT(997) in .\source\classes\TFOLDEX.PRG
Called from _FWH(3681) in .\source\classes\WINDOW.PRG
Called from WINRUN(0)
Called from TWINDOW:ACTIVATE(1114) in .\source\classes\WINDOW.PRG
Called from MAIN(878) in .\DUALGRID.PRG


Called from: .\source\function\CHECKRES.PRG => (b)FWDELRESOURCE( 36 )
Called from: => ASCAN( 0 )
Called from: .\source\function\CHECKRES.PRG => FWDELRESOURCE( 36 )
Called from: => DELETEOBJECT( 0 )
Called from: .\source\classes\BRUSH.PRG => GRADIENTBRUSH( 815 )
Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:SETFLDCOLORS( 1695 )
Called from: .\source\classes\TFOLDEX.PRG => (b)TFOLDEREX_NEW( 214 )
Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:PAINTTB( 1477 )
Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:PAINT( 1202 )
Called from: .\source\classes\TFOLDEX.PRG => (b)TFOLDEREX( 121 )
Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:DISPLAY( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1823 )
Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:HANDLEEVENT( 997 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3681 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1114 )
Called from: .\DUALGRID.PRG => MAIN( 878 )


not sure "where" i got the Error :?:

---

DUALGRID can use "multi" TAB. now it "store" all TAB and "restore" them at Start
since that Point i got the "Problem" but most it did work without Problem ...

any Idea what i can search for :idea:
need some help please
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: how to "Set" Image on TFolderEx() ?

Postby karinha » Fri May 19, 2023 6:01 pm

Code: Select all  Expand view

   /*
   LOCAL aBitmaps  := { "C:\FWH\bitmaps\32x32\users.bmp", ;
                        "C:\FWH\bitmaps\32x32\delete.bmp", ;
                        "C:\FWH\bitmaps\32x32\fivetech.bmp", ;
                        "C:\FWH\bitmaps\32x32\quit.bmp", }
   */



   @ 3, 3 FOLDEREX oFld PIXEL STRETCH            ;
      PROMPT "&Cadastro", "Futuro"               ;
      TAB HEIGHT 35 ROUND 5                      ;
      BITMAPS "FERRARI", "FERRARI2"              ;  // 32 x 32
      TOP ALIGN FLDBMP_LEFT, FLDBMP_LEFT         ;
      OPTION 1                                   ;
      COLOR CLR_AzulDark FONT oFont

   oFld:nLayOut := 1 //2 -> LEFT

   oFld:aEnable[2] := .F.
 


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

Re: how to "Set" Image on TFolderEx() ?

Postby karinha » Fri May 19, 2023 6:07 pm

Using BitMaps 16x16 in large folderex:

https://imgur.com/apziN3X

Image

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

Re: how to "Set" Image on TFolderEx() ?

Postby Jimmy » Fri May 19, 2023 9:15 pm

hi

thx for Answer.

i do create TAB of FOLDEREX in a Loop using OOP CODE
now i want to "switch" Icon of TAB depend on "active"

Code: Select all  Expand view
LOCAL nOption := oTab:nOption
LOCAL nTabs := LEN( oTab:aBitmaps )

   FOR ii := 1 TO nTabs
      IF ii = nOption
         oTab:SetBitmap( ´MYACTIVE´, nOption )
      ELSE
         oTab:SetBitmap( ´MYTRANSPARENT´, ii )
      ENDIF
      oTab:Update()
   NEXT

it seem to work but i´m not sure if i need to "destroy" Bitmap before o:SetBitmap() :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: how to "Set" Image on TFolderEx() ?

Postby nageswaragunupudi » Sat May 20, 2023 7:11 am

not sure if i need to "destroy" Bitmap before o:SetBitmap(

No need.
SetBitmap() method takes care of it.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: how to "Set" Image on TFolderEx() ?

Postby Jimmy » Sat May 20, 2023 5:54 pm

hi,

thx for Answer
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 95 guests