Hello Antonio,
To simulate the new Office 10 backstage TM button it would be nice to have a new type “TAB” in
TRBtn (rounded on top angled on button)
static aType := { "NORMAL", "POPUP", "SPLITPOPUP", "SAYBUTTON" , “TAB” }
Thanks in advance
Otto
static aType := { "NORMAL", "POPUP", "SPLITPOPUP", "SAYBUTTON","TAB" }
if ::hWnd != 0
if ::nTypeButton = 4
::hRgn := CreateRoundRectRgn( aRect, 6, 6 )
hRgn2 := CreateRectRgn( 5, aRect[ 2 ], aRect[ 3 ],aRect[ 4 ] )
CombineRgn( ::hRgn, ::hRgn, hRgn2, 2 )
DeleteObject( hRgn2 )
elseif ::lRound .and. !::lGrouping
::hRgn := CreateRoundRectRgn( aRect, 6, 6 )
SetWindowRgn(::hWnd, ::hRgn)
add “TAB”
static aType := { "NORMAL", "POPUP", "SPLITPOPUP", "SAYBUTTON","TAB" }
Inserted:
DATA aClrGradBtnTAB
-------------------------------------------------------------------
In the new-Method
changed
if ::lRound .and. !::lGrouping
to
if ::hWnd != 0
if ::nTypeButton = 4
::hRgn := CreateRoundRectRgn( aRect, 6, 6 )
hRgn2 := CreateRectRgn( 5, aRect[ 2 ], aRect[ 3 ],aRect[ 4 ] )
CombineRgn( ::hRgn, ::hRgn, hRgn2, 2 )
DeleteObject( hRgn2 )
elseif ::lRound .and. !::lGrouping
-------------------------------------------------------------------
In the paint-method I changed
if lBorder
to:
if ::nTypeButton == 4
RoundBox( ::hDC, 1, 1, ::nWidth, ::nHeight/2, 6, 6, ::nClrBoxIn )
RoundBox( ::hDC, 0, 0, ::nWidth, ::nHeight/2, 6, 6, ::nClrBoxOut )
RoundBox( ::hDC, 1, 5,::nWidth, ::nHeight, 0, 0, ::nClrBoxIn )
RoundBox( ::hDC, 0, 5,::nWidth, ::nHeight, 0, 0, ::nClrBoxOut )
GradientFill( ::hDC, 3, 1, ::nHeight-1, ::nWidth-1, eval( ::aClrGradBtnTAB ) )
elseif lBorder
if ::lRound
-------------------------------------------------------------------
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 56 guests