Office 10 backstage TM button

Office 10 backstage TM button

Postby Otto » Fri Dec 11, 2009 7: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
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Office 10 backstage TM button

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Office 10 backstage TM button

Postby Otto » Sat Dec 12, 2009 4:23 am

Code: Select all  Expand view



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)

 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Office 10 backstage TM button

Postby Antonio Linares » Sun Dec 13, 2009 3:24 am

Otto,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Office 10 backstage TM button

Postby Otto » Sun Dec 13, 2009 10:01 am

Hello Antonio,
I made the following changes in trbtn.prg
Best regards,
Otto

Code: Select all  Expand view


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:
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Office 10 backstage TM button

Postby Antonio Linares » Sun Dec 13, 2009 1:12 pm

Otto,

We are reviewing your changes,

Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Office 10 backstage TM button

Postby Otto » 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

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests

cron