i want to change Color of Scrollbar when appear.
for this i need Handle of Scrollbar
this i made under Xbase++
---
i have override Fivewin Method for my CLASS TGrid()
- Code: Select all Expand view RUN
- METHOD HScroll( nWParam, nLParam ) VIRTUAL // required for default behavior
METHOD VScroll( nWParam, nLParam ) VIRTUAL // required for default behavior
in CLASS TWindow we have
- Code: Select all Expand view RUN
- DATA oVScroll, oHScroll
which will be "filled"
- Code: Select all Expand view RUN
- if lVScroll
DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self
endif
if lHScroll
DEFINE SCROLLBAR ::oHScroll HORIZONTAL OF Self
endif
now i try this
- Code: Select all Expand view RUN
- METHOD GetScrollbarObj(lVScroll)
LOCAL oObj
LOCAL hWnd := 0
DEFAULT lVScroll := .T.
IF lVScroll
IF __objHasData( self, "oVScroll" )
oObj := ::oVScroll // VERTICAL
ELSE
MsgInfo("no oVScroll" )
ENDIF
ELSE
IF __objHasData( self, "oHScroll" )
oObj := ::oHScroll // HORIZONTAL
ELSE
MsgInfo("no oHScroll" )
ENDIF
ENDIF
IF VALTYPE(oObj) = "O"
IF __objHasData( oObj, "hWnd" )
hWnd := oObj:hWnd
ELSE
MsgInfo("no oObj:hWnd" )
ENDIF
ELSE
MsgInfo("no Object" )
ENDIF
RETURN hWnd
but i get "no Object" even when i can "see" Scrollbar ( ACTION GetScrollbarObj() with Button )
do what i´m doing wrong