FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour bug in Ribbon 2010 style
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
bug in Ribbon 2010 style
Posted: Fri Jul 15, 2011 12:46 PM
Hello,

I compile ribbon sample with 2010 style but does not work fine. Please, see picture.



Uploaded with ImageShack.us

Thank you.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: bug in Ribbon 2010 style
Posted: Fri Jul 15, 2011 11:24 PM
Hello

please change this method in tribbon.prg

Code (fw): Select all Collapse
METHOD AddGroup( nWidth, cCaption, nDialogs, bAction, cBitmap, aGrad )

   local oGroup, nCol := 1, n
   local hBmp

   DEFAULT nWidth:= 150, cCaption := "", nDialogs := 150

   if nDialogs > Len( ::aDialogs ) .or. nDialogs < 1
      MsgStop( "Non defined dialogs", "Fivewin: Ribbonbar Support" )
      return nil
   endif

   if !empty( ::aDialogs[ nDialogs ]:aControls )
      for n= 1 to Len( ::aDialogs[ nDialogs ]:aControls )
         if ::aDialogs[ nDialogs ]:aControls[ n ]:ClassName() == "TRBGROUP"
            nCol += ::aDialogs[ nDialogs ]:aControls[ n ]:nWidth + ::nGroupSeparation
         endif
      next
   endif
   
   if aGrad != NIL 
      hBmp = GradientBmp( Self, ::nRight - ::nRightMargin - 3, ::nBottom - ::nTopMargin + 1, aGrad )
   else
      hBmp = ::hBmpBrushEx
   endif   

   oGroup := TRBGroup():New( ::aDialogs[ nDialogs ], 1, nCol,;
                             ::aDialogs[ nDialogs ]:nHeight - 3, nWidth, ;
                             Len( ::aControls )+1, cCaption, bAction , ::nClrBoxIn, ::nClrBoxOut,,;
                             CreatePatternBrush(  hBmp  ), , , , Self, ,cBitmap )
   if aGrad != NIL
      DeleteObject( hBmp )
   endif 

return oGroup
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: bug in Ribbon 2010 style
Posted: Sat Jul 16, 2011 01:37 PM

Thank you, I will test.

And what about Menu blue colour not the same as msgbar?.

Thanks

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: bug in Ribbon 2010 style
Posted: Sat Jul 16, 2011 01:53 PM
Hello

i saw some programs with 2010 style (including windows explorer) and the menu only change in internal color
look this post http://forums.fivetechsupport.com/viewtopic.php?p=115469#p115469
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: bug in Ribbon 2010 style
Posted: Sat Jul 16, 2011 02:05 PM

Hello

Blue colour is for 2007. For 2010 colour should be the same as msgbar.

Anyway, I need to change menu that its colour is the same as msgbar. Otherwise I can´t use 2010 style.

Please, how can I do?.

Thank you.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: bug in Ribbon 2010 style
Posted: Sat Jul 16, 2011 02:10 PM

Hello

to next fivewin release i will try build a custom skin menu (but i dont promise), for now is not possible, sorry

Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: bug in Ribbon 2010 style
Posted: Sun Jul 17, 2011 08:50 AM

Hello,

Thank you very much. It would be a great idea.

If not, you can provide full source code of menu, so I can make those changes. I don´t understand why is not included.

Thank you again.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug in Ribbon 2010 style
Posted: Sun Jul 17, 2011 03:46 PM

Ukservice,

We will try to modify FWH Class TMenu so it admits custom defined colors :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: bug in Ribbon 2010 style
Posted: Sun Jul 17, 2011 04:55 PM

Thank you Master.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82

Continue the discussion