Marc Venken wrote:C5 is a external class ?
CLASS TMyControl FROM TControl
CLASSDATA lRegistered AS LOGICAL
DATA oBrw
DATA nClrHover INIT RGB( 66, 142, 255 )
DATA aItems
METHOD New( nTop, nLeft, oWnd, nPos, nClrFore,;
nClrBack, lPixel, lDesign, nWidth, nHeight,;
cMsg, lVertical ) CONSTRUCTOR
METHOD ReDefine( nId, oWnd ) CONSTRUCTOR
METHOD AddItem(cPrompt, bAction, cBitmap)
METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaint(), 0
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( nTop, nLeft, oWnd, nPos, nClrFore, nClrBack, lPixel,;
lDesign, nWidth, nHeight, cMsg, lVertical ) CLASS TMyControl
DEFAULT nTop := 0, nLeft := 0,;
oWnd := GetWndDefault(),;
nClrFore := oWnd:nClrText,;
nClrBack := GetSysColor( 15 ),;
lPixel := .f.,;
lDesign := .f.,;
nWidth := 200, nHeight := 21,;
lVertical := .f.
::nStyle = nOR( WS_CHILD, WS_VISIBLE, WS_TABSTOP )
::nId = ::GetNewId()
::oWnd = oWnd
::cMsg = cMsg
::nTop = If( lPixel, nTop, nTop * SAY_CHARPIX_H )
::nLeft = If( lPixel, nLeft, nLeft * SAY_CHARPIX_W )
::nBottom = ::nTop + nHeight - 1
::nRight = ::nLeft + nWidth - 1
::lDrag = lDesign
::lCaptured = .f.
::nClrText = nClrFore
::nClrPane = nClrBack
::Register()
if ! Empty( oWnd:hWnd )
::Create()
::Default()
oWnd:AddControl( Self )
else
oWnd:DefControl( Self )
endif
if lDesign
::CheckDots()
endif
SetWndDefault( Self )
return Self
//----------------------------------------------------------------------------//
METHOD ReDefine( nId, oWnd ) CLASS TMyControl
DEFAULT oWnd := GetWndDefault()
::nId = nId
::oWnd = oWnd
::Register()
oWnd:DefControl( Self )
return Self
//----------------------------------------------------------------------------//
METHOD AddItem(cPrompt, bAction, cBitmap) CLASS TMyControl
local oItem
local nPos
oItem =TBtnBmp():New( 1, 1,, ::nHeight-4,,, cBitmap, cBitmap,bAction, self, cPrompt )
* AAdd( ::aItems, oItem )
return nil
function XbrSetupBar( oBrw ,cData)
local cSeek := space(100)
Local oBtnClear, oFilters
Local aExelcol1 := {"Id","Benaming","Pag","Reflev","Merk"}
local aFilters:={ "Filter1","Filter2" }
default cData:=""
oBrw:nTopBarHeight := 70
oBrw:bOnAdjust := <||
local oBtn
@ 05,10 BTNBMP oBtn PROMPT "New" RESOURCE "ADD" SIZE 60,60 PIXEL OF oBrw NOBORDER ;
ACTION (xBrsetupbuttons(oBrw,cData),oBrw:refresh()) TOOLTIP "Add New Record"
@ 05,100 BTNBMP oBtn PROMPT "Edit" RESOURCE "EDIT" SIZE 60,60 PIXEL OF oBrw NOBORDER ;
ACTION (oBrw:EditSource(),oBrw:refresh()) TOOLTIP "Edit this record"
// ....
@ 15,1400 COMBOBOX oFilters VAR aFilters SIZE 250,150 PIXEL OF oBrw
@ 15,1690 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 100,400 PIXEL OF oBrw
return nil
>
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 80 guests