RIBBON NATIVA AVANCES

RIBBON NATIVA AVANCES

Postby Jonathan Hodder » Thu Nov 19, 2009 1:06 am

I refer to the topic in the Spanish forum

http://forums.fivetechsupport.com/viewtopic.php?f=6&t=17037

Antonio says

The design of the RibbonBar of Microsoft has changed since Office 2007 and that model has been implemented in Windows 7.

We are not supporters of drawing on the title bar. Maybe we can place those buttons on the tabs of RibbonBar.

And Windows 7 has eliminated the "round" used in Office 2007, and has become a tab in the Tab, blue.

So now we should decide between all that is our preferred choice model


Yes I am in favour of leaving the strange round button off the title bar but.
Please put the buttons on the title bar so we can include common commands such as undo/redo/file/print etc.

How far away are these changes?
I want to upgrade my FW now exchange rate is ok.

Jonathan
Jonathan Hodder
 
Posts: 77
Joined: Sun Aug 26, 2007 11:53 pm

Re: RIBBON NATIVA AVANCES

Postby Antonio Linares » Thu Nov 19, 2009 2:02 am

Jonathan,

Using FWH current RibbonBar and Class TRBtn, we can already do it very easily, See how nice it looks :-)

Image

Code: Select all  Expand view  RUN

 ...
   DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Configuración", "Ficheros", "Informes", "Ayudas" HEIGHT 160 TOPMARGIN 55

   oTBtn1 = TRBtn():New( 10, 10,,, "..\bitmaps\16x16\new2.bmp", {|| MsgInfo( "new" ) }, oRBar )

   oTBtn2 = TRBtn():New( 10, 35,,, "..\bitmaps\16x16\open2.bmp", {|| MsgInfo( "open" ) }, oRBar )

   oTBtn3 = TRBtn():New( 10, 60,,, "..\bitmaps\16x16\exit2.bmp", {|| MsgInfo( "exit" ) }, oRBar )

   ADD GROUP oGr RIBBON oRBar TO OPTION 1 PROMPT "Clipboard" width 130 //BITMAP "c:\fwh\bitmap\fivetech.BMP"
 ...
 
regards, saludos

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

Re: RIBBON NATIVA AVANCES

Postby Otto » Thu Nov 19, 2009 6:52 am

Antonio, thank you.
Best regards,
Otto

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

Re: RIBBON NATIVA AVANCES

Postby Jonathan Hodder » Thu Nov 19, 2009 9:17 pm

Yes very nice.

Image

1) Can ribbon bar have a first tab drop down menu to replace the 'round' that was in Office 2007?

2) Can TRBtn buttons be placed on the title bar?

Thanks
Jonathan
Jonathan Hodder
 
Posts: 77
Joined: Sun Aug 26, 2007 11:53 pm

Re: RIBBON NATIVA AVANCES

Postby Silvio » Fri Nov 20, 2009 8:24 am

Antonio,
CAn we insert a big Round button at init ( at left ) as default a gray circle bitmaps where insert the bitmap of our application and the a small oBar where we can inser oTbtn1,oTbtn2,oTbtn3 ?

I thinked also ... we have the possibility to customize this ribbon with another colors : BLUE ( now we use this) , BLACK, SILVER, AQUA ?

CAN we use Normal font or large fonts ?

Can we move all RIGHT TO LEFT ?

can we show quick access toolbar ?

can we show the Horizontal menu ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: RIBBON NATIVA AVANCES

Postby Silvio » Fri Nov 20, 2009 8:41 am

this is my idea :
create a new method where create a small buttonbar where insert mini buttons
I try to create this but I not Know how create rge roundbox smaller at the left angle of the ribbon

METHOD PaintQuickAccess() CLASS TRibbonBar
local nTop, nBottom
local aRect := GetClientRect( ::hWnd )
local hDCMem, hBmpMem, hBmpBrush, hOldBmpBrush
local hOldBmp
local hBrush, hBrush2
local n, nType

local aInfo

aInfo := ::DispBegin()

default nType := 4


hDCMem = CreateCompatibleDC( ::hDC )

hBmpMem = CreateCompatibleBitmap( ::hDC, aRect[ 4 ], aRect[ 3 ] )

hOldBmp = SelectObject( hDCMem, hBmpMem )


hBrush2 = CreateSolidBrush( ::nClrPaneRB )
FillRect( hDCMem, aRect, hBrush2 )

nTop = aRect[ 1 ] + 5

RoundBox( hDCMem, 1, nTop-10, aRect[ 4 ]+1, aRect[ 3 ], 5, 7, ::nClrBoxOut )
RoundBox( hDCMem, 2, nTop , aRect[ 4 ], aRect[ 3 ], 5, 7, ::nClrBoxIn )



BitBlt( ::hDC, 0, 0, aRect[4], aRect[3], hDCMem, 0, 0, SRCCOPY )


SelectObject( hDCMem, hOldBmp )

DeleteObject( hBrush )
DeleteObject( hBrush2 )
DeleteObject( hBmpMem )

DeleteDC( hDCMem )

::DispEnd( aInfo )

return NIL



Create this we can use on TribbonBAr a oQuick Data where we can insert buttons
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: RIBBON NATIVA AVANCES

Postby Silvio » Fri Nov 20, 2009 9:12 am

OR THIS A SOLUTION




Code: Select all  Expand view  RUN





function main()

   local oRBar
   local oWnd, oMenu
   local oGr, oGr1, oGr2, oGr3, oGr4
   local oBtn,   oBtn1,  oBtn2,  oBtn3,  oBtn4, oBtn5
   local oBtn6,  oBtn7,  oBtn8,  oBtn9,  oBtn10
   local oBtn11, oBtn12, oBtn13, oBtn14, oBtn15
   local oBtn16, oBtn17, oBtn18, oBtn19, oBtn20
   local oBtn21, oBtn22, oBtn23, oBtn24, oBtn25
   local oBtn26, oBtn27, oBtn28, oBtn29, oBtn30
   local oBtn31, oBtn32, oBtn33, oBtn34, oBtn35

   Local oQuickAccessBar
   Local  oTBtn0,oTBtn1,oTBtn2,oTBtn3

   menu oMenu Popup 2007

      menuitem "Style Set" FILE "..\bitmaps\styleset161.BMP"
      menuitem "Colors"
      menuitem "Font"

   endmenu

   DEFINE WINDOW oWnd TITLE "RibbonBar Test " + FWVERSION from 1,1 to 600,600 pixel //brush oBrush1



   DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Configuración", "Ficheros", "Informes", "Ayudas" HEIGHT 160 TOPMARGIN 55

// to create round button big at the init

   oTBtn0 = TRBtn():New( 5, 5,50,50, "..\bitmaps\btnstr0.bmp", {|| MsgInfo( "new" ) }, oRBar )



   // to create a small Quick Access toolbar

   oQuickAccessBar:= TRBGroup():New(oRBar, 6, 60,;
                                                          25, oRBar:nRight , ;
                                                          2, , , , ,,;
                                                           oRBar:hBrushEx, , , , oRBar, )


   // to insert button on QuikAccess Toolbar

   oTBtn1 = TRBtn():New( 5, 5,,, "..\bitmaps\16x16\new2.bmp", {|| MsgInfo( "new" ) }, oQuickAccessBar )

   oTBtn2 = TRBtn():New( 5, 35,,, "..\bitmaps\16x16\open2.bmp", {|| MsgInfo( "open" ) }, oQuickAccessBar )

   oTBtn3 = TRBtn():New( 5, 60,,, "..\bitmaps\16x16\exit2.bmp", {|| MsgInfo( "exit" ) }, oQuickAccessBar )


 
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: RIBBON NATIVA AVANCES

Postby Jonathan Hodder » Sat Nov 21, 2009 4:07 am

Silvio - In Windows 7 M$ applications the big round button has been superceeded by the menu tab at
the start of the ribbon bar. To keep up to date do u realy want a round button now.

Image
Antonio -

1) Are there plans to have a first tab drop down menu on the ribbon bar to replace the 'round' that was in 2007?

2) Are there plans to be able to place TRBtn buttons on the title bar?

Thanks
Jonathan
Jonathan Hodder
 
Posts: 77
Joined: Sun Aug 26, 2007 11:53 pm

Re: RIBBON NATIVA AVANCES

Postby Otto » Sat Nov 21, 2009 8:00 am

Hello Jonathan,
have you tried:

Image
Code: Select all  Expand view  RUN
 
oTBtn3 = TRBtn():New( 1, 5,40,, ".\bitmaps\16x16\exit2.bmp", {|| ownd:end() }, oRBar ,;
    , , , ,;
               , , , , , , ;
               , , , "POPUP")
 
 //oTBtn3:cTypeButton := "POPUP"
 /*
 METHOD New( nTop, nLeft, nWidth, nHeight, cName, ;
               bAction, oWnd, cMsg, bWhen, lAdjust, lUpdate,;
               cPrompt, oFont, lBorder, lRound, cLayout, hBack, ;
               cToolTip, nTopEx, nLeftEx, cTypeButton,oPopup,;
               bClrGradNormal, aClrGradOver, bClrGradSubOver, ;
               aClrGradUnder, aClrGradBack, bClrGradSelect, bClrGradSelectPress, aClrGradBtnGr,;
               lGrouping, lFirstElm, lEndElm, lTrans, aGradiant, nClrBoxIn, nClrBoxOut )
 
  */

 


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

Re: RIBBON NATIVA AVANCES

Postby Antonio Linares » Sat Nov 21, 2009 8:03 am

Jonathan,

1) We can implement it quite easily, but that would force everyone to use the Windows 7 look.

2) We can paint on the title bar using Method NcPaint(), but we prefer not to paint there. Better leave Windows to use that area itself, or we could break the transparencies, etc. used in Windows 7.
regards, saludos

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

Re: RIBBON NATIVA AVANCES

Postby Antonio Linares » Sat Nov 21, 2009 8:04 am

Otto,

Very interesting suggestion, thanks! :-)
regards, saludos

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

Re: RIBBON NATIVA AVANCES

Postby Otto » Sat Nov 21, 2009 8:07 am

Image

Code: Select all  Expand view  RUN


 menu oMenu Popup 2007
   
      menuitem "Style Set" FILE "..\bitmaps\styleset161.BMP"
      menuitem "Colors"
      menuitem "Font"
     
   endmenu
   
   ***************************

 oTBtn3 = TRBtn():New( 1, 5,40,, ".\bitmaps\16x16\exit2.bmp", {|| ownd:end() }, oRBar ,;
    , , , ,;
               , , , , , , ;
               , , , "POPUP",oMenu)

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

Re: RIBBON NATIVA AVANCES

Postby Antonio Linares » Sun Nov 22, 2009 12:11 pm

Otto,

Taking your idea one step further, so we can have Windows 7 look without forcing it in the Class :-)

Image

Image

Code: Select all  Expand view  RUN

   ...
   local oTBtn0, oTBtn1, oTBtn2, oTBtn3
   local aClrMenu1 := { { 0.5, RGB( 69, 124, 188 ), RGB( 41, 93, 171 ) }, ;
                       { 0.5, RGB( 26, 64, 136 ), RGB( 56, 135, 191 ) } }
   local aClrMenu2 := { { 0.5, RGB( 123, 178, 236 ), RGB( 71, 126, 205 ) }, ;
                       { 0.5, RGB( 17, 78, 175 ), RGB( 128, 225, 255 ) } }
   ...
   DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Configuración", "Ficheros", "Informes", "Ayudas" HEIGHT 160 TOPMARGIN 55
   
   oRBar:nLeftMargin = 75
   oRBar:CalcPos()

   oTBtn0 = TRBtn():New( 34, 0, 70, 20, "..\bitmaps\rbnmenu.bmp", { || MsgInfo( "action" ) }, oRBar ,;
                         ,,,,,, .T., .T.,,,,,, "POPUP", oMenu,,,,,,,,,,,,, aClrMenu1, nRGB( 125, 172, 215 ),;
                         nRGB( 65, 106, 189 ) )
   oTBtn0:aClrGradOver = { || aClrMenu2 }
   oTBtn0:bClrGradSubOver = { || aClrMenu2 }
   ...
 

This is looking better and better :-)
regards, saludos

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

Re: RIBBON NATIVA AVANCES

Postby Antonio Linares » Sun Nov 22, 2009 12:31 pm

Now, moving the top bitmaps to the right side and reducing the top margin to make it lool more Windows 7 alike:

Image

FWH RibbonBar is really flexible and powerfull! :-)

Code: Select all  Expand view  RUN

   DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Configuración", "Ficheros", "Informes", "Ayudas" HEIGHT 133 TOPMARGIN 25
   
   oRBar:nLeftMargin = 75
   oRBar:CalcPos()

   oTBtn0 = TRBtn():New( 4, 0, 70, 20, "..\bitmaps\rbnmenu.bmp", { || MsgInfo( "action" ) }, oRBar ,;
                         ,,,,,, .T., .T.,,,,,, "POPUP", oMenu,,,,,,,,,,,,, aClrMenu1, nRGB( 125, 172, 215 ),;
                         nRGB( 65, 106, 189 ) )
   oTBtn0:aClrGradOver = { || aClrMenu2 }
   oTBtn0:bClrGradSubOver = { || aClrMenu2 }
                         
   oTBtn1 = TRBtn():New( 4, 410,,, "..\bitmaps\16x16\new2.bmp", {|| MsgInfo( "new" ) }, oRBar )

   oTBtn2 = TRBtn():New( 4, 435,,, "..\bitmaps\16x16\open2.bmp", {|| MsgInfo( "open" ) }, oRBar )

   oTBtn3 = TRBtn():New( 4, 460,,, "..\bitmaps\16x16\exit2.bmp", {|| oWnd:End() }, oRBar )
 
regards, saludos

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

Re: RIBBON NATIVA AVANCES

Postby Antonio Linares » Sun Nov 22, 2009 12:47 pm

Making the mouse over colors even nicer :-)

Image

Code: Select all  Expand view  RUN

   oTBtn0:aClrGradOver = { || aClrMenu2 }
   oTBtn0:aClrGradBack = aClrMenu2
   oTBtn0:bClrGradSubOver = { || aClrMenu2 }
 
regards, saludos

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

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 68 guests