How To Make Tree Transparent

How To Make Tree Transparent

Postby acwoo1 » Sun May 06, 2012 4:45 am

Hi


Code: Select all  Expand view
function main()

#Include "FiveWin.ch"


   LOCAL oDlg, oTree, oImageList
   local oFont
   local cDirect1:= space(40)

   DEFINE FONT oFont NAME "Arial" SIZE 0, -11

        DEFINE DIALOG oDlg FROM 0, 0 TO 26, 79 ;
        TITLE "Test Tree" ;
          GRADIENT { { 1, nRGB( 199, 216, 237 ), nRGB( 237, 242, 248 ) } }


   oImageList = TImageList():New()
   oImageList:Add( TBitmap():Define( , "folder.bmp", oDlg ),;
                   TBitmap():Define( , "folder.bmp", oDlg ) )
   @ 0.25, 0.5 TREEVIEW oTree OF oDlg SIZE 306,170
   oTree:bLClicked := { | nRow, nCol, nKeyFlags | MyClick1Test( nRow, nCol, oTree, cDirect1 ) }

   @ 9.95, 22.5 BUTTON "&Exit"   OF oDlg ACTION oDlg:End() SIZE 40, 12

   ACTIVATE DIALOG oDlg CENTERED ON INIT AddItems1Test( oTree, oImageList, cDirect1 )

Return NIL

********************************************************************************
Function AddItems1Test( oTree, oImageList, cDirect1 )
 
   local oItem1, oItem2, oItem3
   local lItem1a:= .t., lItem2a:= .t., lItem3a:= .t.

   oTree:SetImageList( oImageList )
 
   oItem1 = oTree:Add( "Personnel", 1 )

     oItem11 = oItem1:Add( "Add",   6) ; oItem11:Cargo:={"Personnel", 1}
     oItem12 = oItem1:Add( "View",   6) ; oItem12:Cargo:={"Personnel", 2}
     oItem13 = oItem1:Add( "Edit", 6) ; oItem13:Cargo:={"Personnel", 3}


   oTree:Expand()

Return NIL

********************************************************************************
Function Myclick1Test( nRow, nCol, oTree, cDirect1 )


   local oItem, array, Mydate, Mget, hItem, II, oItemRadio

   oItem := oTree:HitTest( nRow, nCol )

   IF oItem != NIL
      IF oItem:Cargo != NIL      
         array := oItem:Cargo
         DO CASE
           CASE array[1] = "Personnel"
              if array[2] = 1
                   msginfo(" Item 1")
              elseif array[2] = 2
                   msginfo(" Item 2")
              elseif array[2] = 3
                   msginfo(" Item 3")
              endif      
         ENDCASE
      ENDIF
   ENDIF

return nil

********************************
 


How to make the above transparent

Thanks
Regards
ACWoo
Using FHW1201+bcc582+Harbour
acwoo1
 
Posts: 173
Joined: Tue Nov 10, 2009 10:56 am

Re: How To Make Tree Transparent

Postby Antonio Linares » Sun May 06, 2012 9:02 am

Acwoo,

You can only change its colors using:

oTree:SetColor( nClrText, nClrPane )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How To Make Tree Transparent

Postby acwoo1 » Sun May 06, 2012 12:56 pm

Thanks very much.

Regards

ACWoo
acwoo1
 
Posts: 173
Joined: Tue Nov 10, 2009 10:56 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 101 guests