Can you change the TPanel class so it has a user definable color. I did it like this:
- Code: Select all Expand view
//----------------------------------------------------------------------------//
CLASS TPanel FROM TControl
METHOD New( nTop, nLeft, nBottom, nRight, oWnd, nClrPane ) CONSTRUCTOR //PM (Added nClrPane)
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( nTop, nLeft, nBottom, nRight, oWnd, nClrPane ) CLASS TPanel //PM (Added nClrPane)
DEFAULT nTop := 0, nLeft := 0, nBottom := 100, nRight := 100,;
oWnd := GetWndDefault()
DEFAULT nClrPane := GetSysColor( COLOR_BTNFACE ) //PM
::nTop = nTop
::nLeft = nLeft
::nBottom = nBottom
::nRight = nRight
::oWnd = oWnd
::nStyle = nOr( WS_CHILD, WS_VISIBLE )
::lDrag = .f.
::nClrPane = nClrPane //PM
#ifdef __XPP__
DEFAULT ::lRegistered := .f.
#endif
::Register()
if ! Empty( ::oWnd:hWnd )
::Create()
::oWnd:AddControl( Self )
else
::oWnd:DefControl( Self )
endif
return Self
Look for the //PM code for the changes I made.
Tx!
Patrick