say, checkbox, radio in ribbonbar

say, checkbox, radio in ribbonbar

Postby marzio » Tue Feb 14, 2017 11:06 am

i have inserted in a ribbonbar SAY, CHECKBOX, RADIOBUTTON,
how can i obtain these objects transparent?
thanks, marzio

Image

DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Configuración", "Ficheros", "Informes", "Ayudas" HEIGHT 160 TOPMARGIN 55 ACTION IIf(nOption = 3, MsgInfo(),)
ADD GROUP oGr5 RIBBON oRBar TO OPTION 2 PROMPT "Editing" WIDTH 275 GRADIANT { { 0.1, RGB( 218, 229, 243 ), RGB( 174, 150, 169 ) }, { 0.97, RGB( 174, 150, 169 ), RGB( 218, 229, 243 ) } }
@ 2, 5 SAY "transparenting say" OF oGr5 TRANSPARENT
@ 4, 5 CHECKBOX oBox PROMPT "transparent checkbox" OF oGr5
@ 5, 55 SAY "transparent say" OF oRBar TRANSPARENT
marzio
 
Posts: 129
Joined: Wed Apr 04, 2007 6:54 am

Re: say, checkbox, radio in ribbonbar

Postby ukoenig » Wed Feb 15, 2017 1:03 am

Marzio,

these objects are defined as BUTTONS like :

Image

@ 68, 30 ADD BUTTON oSay1 GROUP oGr SIZE 65, 15 PROMPT "A Say" SAYBUTTON

@ 64, 70 ADD BUTTON oChk1 GROUP oGr1 BITMAP ".\bitmaps\checkon.bmp" MOSTLEFT SIZE 85, 18 PROMPT "Checkbox" ;
ACTION ( lVal1 := ! lVal1, oChk1:SetFile( If( lVal1, ".\bitmaps\checkon.bmp", ".\bitmaps\checkoff.bmp" ) ) )


regards
Uwe :D
Last edited by ukoenig on Wed Feb 15, 2017 1:01 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: say, checkbox, radio in ribbonbar

Postby marzio » Wed Feb 15, 2017 6:19 am

Ah, ok.
Many thanks Uwe.
marzio
 
Posts: 129
Joined: Wed Apr 04, 2007 6:54 am

Re: say, checkbox, radio in ribbonbar

Postby ukoenig » Wed Feb 15, 2017 12:57 pm

Marzio,

the missing RADIO - solution
< n > = the selected radio

Image

Right mouseclick to save the bmp's

Image

Image

Code: Select all  Expand view

I := 1
aPrompts  := { "Opt. 1", "Opt. 2", "Opt. 3" }
aTooltips  := { "Tooltip" + CRLF + "of Opt. 1", "Tooltip" + CRLF + "of Opt. 2", "Tooltip" + CRLF + "of Opt. 3" }
nLeft := 10   // first left radio
nBtnPos := 1 // defined startposition
FOR I := 1 to 3 // 3 buttons
    @ 64, nLeft ADD BUTTON oRadio[I] GROUP oGr2  BITMAP ".\bitmaps\BRadio1.bmp" MOSTLEFT SIZE 60, 18 PROMPT aPrompts[I] ;
    ACTION ( nBtnPos := ::Cargo, ;
                AEVAL( oRadio, { | o, n | oRadio[ n ]:SetFile( ".\bitmaps\BRadio1.bmp" ), ;
                         IF( n = nBtnPos, oRadio[ n ]:SetFile( ".\bitmaps\BRadio2.bmp" ), NIL ) } ) ) // SELECTED ( include a function if needed )
    oRadio[ I ]:cToolTip :=  { aTooltips[ I ], CLR_BLACK, 14089979 } 
    oRadio[ I ]:Cargo := I
    IIF( I = nBtnPos, oRadio[ I ]:SetFile( ".\bitmaps\BRadio2.bmp" ), ; // RED
                      oRadio[ I ]:SetFile( ".\bitmaps\BRadio1.bmp" ) )  // GREEN
    nLeft += 65
NEXT
 


regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: say, checkbox, radio in ribbonbar

Postby marzio » Wed Feb 15, 2017 7:26 pm

thanks for everything Uwe. you've been very kind.
i am doing some try
do you think that in the say is possible change font and color of the text?
@ 68, 30 ADD BUTTON oSay1 GROUP oGr SIZE 65, 15 PROMPT "A Say" SAYBUTTON
i have tried but with no success.

Marzio
marzio
 
Posts: 129
Joined: Wed Apr 04, 2007 6:54 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 119 guests