FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Office 10 backstage TM button
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Office 10 backstage TM button
Posted: Fri Dec 11, 2009 07:35 AM
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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Office 10 backstage TM button
Posted: Fri Dec 11, 2009 11:04 AM

Otto,

We plan to keep improving FWH RibbonBar more and more :-)

many thanks for your great feedback :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Office 10 backstage TM button
Posted: Sat Dec 12, 2009 04:23 AM
Code (fw): Select all Collapse
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)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Office 10 backstage TM button
Posted: Sun Dec 13, 2009 03:24 AM

Otto,

Would you mind to post a screenshot to see how it looks ? thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Office 10 backstage TM button
Posted: Sun Dec 13, 2009 10:01 AM
Hello Antonio,
I made the following changes in trbtn.prg
Best regards,
Otto

Code (fw): Select all Collapse
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
-------------------------------------------------------------------


Here is the screenshot:
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Office 10 backstage TM button
Posted: Sun Dec 13, 2009 01:12 PM

Otto,

We are reviewing your changes,

Thanks! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Office 10 backstage TM button
Posted: Thu Dec 17, 2009 11:36 PM
To switch between backstage and the ribbonbar I use:

oWnd:bLClicked := { |y,x, nFlags | EnableWindow( oRBar:hWnd, .t. ),;
oRbar:LButtonDown( y,x , nFlags )}

and from inside on the closebutton:
oWnd:LButtonDown( 1,1 )

Best regards,
Otto



Continue the discussion