FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Office 2010 Beta ribbon
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Office 2010 Beta ribbon
Posted: Tue Dec 08, 2009 05:14 PM
Today I downloaded Office 2010 Beta.
Now I try to get a similar look with FIVEWIN.

It seems to me that the ribbonbar is used like a titlebar. How could this be done?

Best regards,
Otto




Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Office 2010 Beta ribbon
Posted: Tue Dec 08, 2009 05:55 PM

Otto,

You could change FWH Ribbon colors to make it look similar to 2010, as a first step :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Office 2010 Beta ribbon
Posted: Tue Dec 08, 2009 06:24 PM
Hello Antonio,

would you be so kind to show how to change the color.

------------

To get the cCaption centered I use:

Code (fw): Select all Collapse
activate window ::oWnd ;
   ON RESIZE (  ::onresize() ) 


method onresize()
    local nSpaceWidth  := ::oWnd:GetWidth(" ", )
    local cCaption:= APP_TITLE
    local nSpaces := 0
    local nSpaceBTNs := 140

    nSpaces :=  ( ::oWnd:nWidth - nSpaceBTNs - ::oWnd:GetWidth(cCaption, ) ) / 2  / nSpaceWidth
    ::oWnd:cTitle( space( nSpaces ) + cCaption )

return nil


It is working but maybe it is possible to pass nTop , nLeft directly to SetWindowText or to use a cTitle:Centered ?


------------

I tried resize oRBAR with

oRBAR:resize(4,0,0), oRBAR:paint()

but this is not the right method to open and close the ribbon. Do you think this is possible by now?

------------
The backstage button seems more as a TAB than a button.

Best regards,
Otto
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Office 2010 Beta ribbon
Posted: Tue Dec 08, 2009 06:59 PM

Otto,

I just sent an email to Uwe to know if his RibbonBar designer is already available :-)

It will easy the way to setup colors, etc. of the Ribbon

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Office 2010 Beta ribbon
Posted: Tue Dec 08, 2009 07:03 PM

Otto,

In this thread we discussed the colors settings of the Ribbon:

viewtopic.php?f=3t=16344start=0hilit=ribbonbar

viewtopic.php?p=84585#p84585

&&&

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Office 2010 Beta ribbon
Posted: Tue Dec 08, 2009 10:13 PM
Antonio,

I try in FW-sample ribbon to disable and enable the Ribbon.
But enable does not work for me.
Could you please help me.
Thanks in advance
Otto

Code (fw): Select all Collapse
 oTBtn1 = TRBtn():New( 4, 410,,, "..\bitmaps\16x16\new2.bmp", {|| oRBar:enable() ,msginfo("enable")}, ownd ) 
   oTBtn2 = TRBtn():New( 4, 435,,, "..\bitmaps\16x16\open2.bmp", {|| oRBar:disable() }, oRBar )
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Office 2010 Beta ribbon
Posted: Tue Dec 08, 2009 10:19 PM
Antonio,
I think I found the problem:
oRBar has a own enable method.
What could I do? I need enable for the control.
Best regards,
Otto
Code (fw): Select all Collapse
METHOD Enable( nPos, lOnOff ) CLASS TRibbonBar
   local lOldStatus

   default nPos := ::nOption

   if nPos > len( ::aDialogs ) .or. nPos < 1
      return NIL
   endif

   if lOnOff != NIL
      lOldStatus := ::aEnable[ nPos ]
      ::aEnable[ nPos ] := lOnOff
      ::Default()
      ::Refresh()
   endif

return ::aEnable[ nPos ]
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Office 2010 Beta ribbon
Posted: Tue Dec 08, 2009 10:23 PM
Code (fw): Select all Collapse
EnableWindow( oRBar:hWnd, .t. )

is working.

Best regards,
Otto
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Office 2010 Beta ribbon
Posted: Wed Dec 09, 2009 12:07 AM
Otto,

You could also use:
Code (fw): Select all Collapse
oRBar:Super:Enable()
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Office 2010 Beta ribbon
Posted: Wed Dec 09, 2009 12:22 AM
Antonio, thank you for your help.

Best regards,
Otto



Continue the discussion