PROBLEMA CON TREE

PROBLEMA CON TREE

Postby informaticaeloy » Tue Dec 31, 2013 3:07 am

Hola. Llevo todo el día para conseguir hacer un tree pero soy incapaz. Me estoy volviendo loco!!!

Esto es lo que tengo:
Code: Select all  Expand view
FUNCTION INFOALB()


DEFINE DIALOG dENRUTA FROM 0, 0 TO 505, 715  pixel;
                TITLE "Información del albarán" of prin font ofontdlg

    @ 10,10 TREEVIEW oTree OF dENRUTA SIZE 195, 130 PIXEL

   ACTIVATE DIALOG dENRUTA  CENTER ON INIT BUILDTREE(OTREE, dENRUTA)


   INICIOAL:SETFOCUS()
RETURN .T.

function BuildTree( oTree, dENRUTA )

   local oItem, oImageList
 
   oImageList = TImageList():New()

   oImageList:Add( TBitmap():Define( ".\BMPEMP\EURO.BMP",,  dENRUTA ),;
                   TBitmap():Define( ".\BMPEMP\EURO.BMP",, dENRUTA ) )
                   
   oImageList:Add( TBitmap():Define( ".\BMP\EURO.BMP",,  dENRUTA ),;
                   TBitmap():Define( ".\BMP\EURO.BMP",, dENRUTA ) )
                   
   oImageList:Add( TBitmap():Define( "EURO.BMP",,    dENRUTA ),;
                   TBitmap():Define( "EURO.BMP",, dENRUTA ) )
                   
   oImageList:Add( TBitmap():Define( "bitmap",,  dENRUTA ),;
                   TBitmap():Define( "bmpmask",, dENRUTA ) )
oTree:SetImageList( oImageList )
 
   oItem := oTree:Add( "Main.Item1" ,1)
      oItem:Add( "Detail.Item1..." ,2)
      oItem:Add( "Detail.Item2..." ,3)
      oItem:Add( "Detail.Item3..." )
      oItem:Add( "Detail.Item4..." )
      oItem:Add( "Detail.Item5..." )
      oItem:Add( "Detail.Item6..." )

   oItem:= oTree:Add( "Main.Item2" )
      oItem:Add( "Detail.Item1..." )
      oItem:Add( "Detail.Item2..." )
      oItem:Add( "Detail.Item3..." )
      oItem:Add( "Detail.Item4..." )
      oItem:Add( "Detail.Item5..." )
      oItem:Add( "Detail.Item6..." )

   oTree:ExpandAll()


return nil


El tree se crea pero no consigo hacer que me muestre los bmp que yo quiero en el nodo de cada rama. Tampoco consigo que me funcione el dblclick al hacerlo sobre el último elemento deuna rama. ¿Donde me estoy liando? Gracias.
Windows 10 + FWH 20.08 + BCC 7.4 + Harbour 3.2.0 + PSPad 5.0.3
User avatar
informaticaeloy
 
Posts: 118
Joined: Fri Dec 20, 2013 10:39 am
Location: Zaragoza, España

Return to FiveWin para Harbour/xHarbour

Who is online

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