Por favor, digan si se puede o no
Publicado: Dom Abr 19, 2009 7:01 pm
SI NO ES FACIL O NO ME EXPLICO, POR FAVOR DIGAN ALGO, LA VERDAD ME INTERESA
RESOLVER ESA SITUACION
No se ven dentro del treeview los checkbox por que? y como solucionaria esto
WITH OBJECT oChk := TCheckBox():New(Self) con
TCheckBox():New(::oParent) se ven pero en el objeto que llamo al treeview
:nTop := cxnTop
:nLeft := nLeft
:nWidth := 15
:nHeight := 20
:Create()
END
Tengo la Clase TTreeview sobrecargada
CLASS TTreeView FROM XTreeView
METHOD WMLButtonDown(wParam, lParam)
ENDCLASS
METHOD WMLButtonDown(wParam, lParam ) CLASS TTreeview
LOCAL R, aState, X, I
LOCAL aRect := {}
LOCAL cxLeft, cxEsp, cxbtnSize, cxCant, cdPostPaint
LOCAL oItem, nLeft, nRight, nTop
LOCAL nX := LOWORD( lParam )
LOCAL nY := HIWORD( lParam )
cxEsp := 56
cxBtnSize := 15
IF ( oItem := ::HitTest( nX, nY ) ) != Nil
IF ::SetFocus()
oItem:Select()
ENDIF
ENDIF
cxCant := LEN(oItem:aItems)
AADD(aRect,::GetItemRect(oItem:nIndex))
IF !LEN(aRect) > 0
RETURN .F.
ELSE
cxLeft := aRect[1,1]
nTop := aRect[1,2]
nLeft := ::nWidth - cxLeft // ::nLeft+265 // nWidth - cxLeft
ENDIF
nTop := aRect[1,2]
FOR i:= 0 To cxCant - 1
X := ::nWidth - cxLeft + cxEsp
nLeft := X + (I * cxbtnSize)
IF oItem:IsExpanded
AState := 1
ELSE
AState := 0
ENDIF
WITH OBJECT TCheckBox():New(::oparent)
:nTop := nTop
:nLeft := nLeft
:nWidth := 15
:nHeight := 20
:Create()
END
NEXT
RETURN Super:WMLButtonDown()
Para los que me puedan ayudar diganme como resolver este asunto por favor,
aqui les va un ejemplo de lo que se quiere
Saludos y muchas gracias
RESOLVER ESA SITUACION
No se ven dentro del treeview los checkbox por que? y como solucionaria esto
WITH OBJECT oChk := TCheckBox():New(Self) con
TCheckBox():New(::oParent) se ven pero en el objeto que llamo al treeview
:nTop := cxnTop
:nLeft := nLeft
:nWidth := 15
:nHeight := 20
:Create()
END
Tengo la Clase TTreeview sobrecargada
CLASS TTreeView FROM XTreeView
METHOD WMLButtonDown(wParam, lParam)
ENDCLASS
METHOD WMLButtonDown(wParam, lParam ) CLASS TTreeview
LOCAL R, aState, X, I
LOCAL aRect := {}
LOCAL cxLeft, cxEsp, cxbtnSize, cxCant, cdPostPaint
LOCAL oItem, nLeft, nRight, nTop
LOCAL nX := LOWORD( lParam )
LOCAL nY := HIWORD( lParam )
cxEsp := 56
cxBtnSize := 15
IF ( oItem := ::HitTest( nX, nY ) ) != Nil
IF ::SetFocus()
oItem:Select()
ENDIF
ENDIF
cxCant := LEN(oItem:aItems)
AADD(aRect,::GetItemRect(oItem:nIndex))
IF !LEN(aRect) > 0
RETURN .F.
ELSE
cxLeft := aRect[1,1]
nTop := aRect[1,2]
nLeft := ::nWidth - cxLeft // ::nLeft+265 // nWidth - cxLeft
ENDIF
nTop := aRect[1,2]
FOR i:= 0 To cxCant - 1
X := ::nWidth - cxLeft + cxEsp
nLeft := X + (I * cxbtnSize)
IF oItem:IsExpanded
AState := 1
ELSE
AState := 0
ENDIF
WITH OBJECT TCheckBox():New(::oparent)
:nTop := nTop
:nLeft := nLeft
:nWidth := 15
:nHeight := 20
:Create()
END
NEXT
RETURN Super:WMLButtonDown()
Para los que me puedan ayudar diganme como resolver este asunto por favor,
aqui les va un ejemplo de lo que se quiere
Saludos y muchas gracias