FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Ribbon with transparent say
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Ribbon with transparent say
Posted: Sat Feb 14, 2015 05:26 PM
Hi everyone;

I'm probably forgetting something as I can't seem to be able to place a transparent say on a oRibbon group. Can someone help?

Here is sample code for testing:

Code (fw): Select all Collapse
#include "fivewin.ch"
#include "ribbon.ch"

FUNCTION MAIN()
   LOCAL oWnd, oRibbon, oGroup 
   

   DEFINE WINDOW oWnd 
   
   DEFINE RIBBONBAR oRibbon ;
            PROMPTS "Option 1","Option 2", "Option 3" ;
                 OF oWnd ;
             HEIGHT 90 ;
          TOPMARGIN 20 //;
          //ON CHANGE ::ChangeRibbonBarOption( ::nOption ) OPTION _STARTRIBBONOPTION


   ADD GROUP oGroup RIBBON oRibbon TO OPTION 2 PROMPT "Filter" width 370 
   oGroup:ltransparent := .T. 
   
   @08, 060 SAY "From" SIZE 40, 18 OF oGroup PIXEL TRANSPARENT RIGHT
   
   ACTIVATE WINDOW oWnd 

   
RETURN NIL


Thank you.
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Ribbon with transparent say
Posted: Mon Feb 16, 2015 02:56 PM
Reinaldo

I have never used a Ribbon bar but here is how I define my transparent Says .. I usually define a SetDlgGradient at the top of my program. SetDlgGradient() globally defines the transparent flag in your program as well as creating a nice color scheme for your program. You can define multiple color schemes with this function.

Hope this will work for you!
Rick Lipkin

Code (fw): Select all Collapse
//-----------------------------
Function Main()

Local oFontB,oSay1

LightGreyGrad()
oFontB := TFont():New("Ms Sans Serif",,-6,.F.,.T. ,,,,.F. )
...
...

// now your controls will globally be set for transparent without you adding the 'transparent' clause
// here is how I define a say from resources

REDEFINE SAY oSay1 PROMPT "Customer Invoices" ID 128 OF oGroup UPDATE
oSay1:SetFont( oFontB )
oSay1:SetColor(nRgb(7,7,224)) // blue

// translated without resources .. not tested
@08, 060 SAY oSay1 PROMPT "From" SIZE 40, 18 of oGroup  UPDATE



//------------------
Func LightGreyGrad()

SetDlgGradient( { { .50, nRGB( 216, 216, 216 ), nRGB( 255, 255, 255 ) } } )
Return(nil)

//-----------------
Func StandardGrad()

SetDlgGradient( { { .50, nRGB( 236, 233, 216 ), nRGB( 255, 255, 255 ) } } )
Return(nil)

//--------------------
Func DarkGreyGrad()

SetDlgGradient( { { 0.87, 16777215, 11513775 },{ 0.87,11513775, 16777215 }})
Return(nil)

//--------------------
Func SolidGrey()

SetDlgGradient( { { .50, nRGB( 233, 233, 233 ), nRGB( 233, 233, 233 ) } } )
Return(nil)

//--------------------
Func SolidChoral()

SetDlgGradient( { { .50, nRGB( 171, 129, 151 ), nRGB( 171, 129, 151 ) } } )  // choral
Return(nil)
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Ribbon with transparent say
Posted: Mon Feb 16, 2015 06:30 PM
Hello Reinaldo

you can use RBBTN like a SAY inside a RIBBON's GROUP

Code (fw): Select all Collapse
 @08, 060 ADD BUTTON PROMPT "From" SIZE 40, 18 OF oGroup SAYBUTTON TRANSPARENT
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: Ribbon with transparent say
Posted: Mon Feb 16, 2015 06:58 PM
SetDlgGradient() globally defines the transparent flag in your program as well as creating a nice color scheme for your program. You can define multiple color schemes with this function.


I did not know about these global settings. Thank you very much, Rick.

@08, 060 SAY "From" SIZE 40, 18 OF oGroup PIXEL TRANSPARENT RIGHT


¡Bárbaro!

Gracias, Daniel.

Continue the discussion