Hola,
Pues probando la Ribbon, como hago para poner tooltips a los botones dentro de un grupo?, Hay forma de cambiarle el tipo de letra a la Ribbon o a los botones del grupo? Se puede poner algun tipo de Separator en la QuickAccess?
Gracias
Paco
#include "fivewin.ch"
#include "ribbon.ch"
STATIC oWnd
STATIC oDlgRB[3]
function main()
local oRBar
local oMenu, oMenuWnd, oBrush1
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 oSay1, oBmp, oFont1
LOCAL oCursor
SetBalloon( .T. ) // by rolo
menu oMenu 2007
endmenu
DEFINE FONT oFont1 NAME "Arial" SIZE 0,-30 // BOLD
DEFINE CURSOR oCursor HAND
DEFINE BRUSH oBrush1 COLOR nRGB(210,210,255) // ,nRGB(255,255,255)
DEFINE WINDOW oWnd TITLE "RibbonBar Test " from 1,1 to 600,600 pixel MDI MENU oMenu brush oBrush1
DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Tab 01", "Tab 02", "Tab 03";
HEIGHT 130 TOPMARGIN 25
ADD GROUP oGr RIBBON oRBar TO OPTION 1 PROMPT "Clipboard" width 130 BITMAP "..\bitmap\fivetech.BMP"
@ 02, 05 ADD BUTTON oBtn2 GROUP oGr BITMAP "C:\FWH\bitmaps\cut16.BMP" ;
SIZE 75, 20 MOSTLEFT round ;
action ( Dialog01() )
@ 24, 05 ADD BUTTON oBtn3 GROUP oGr BITMAP "C:\FWH\bitmaps\copy16.BMP" ;
SIZE 75, 20 MOSTLEFT round ;
action( Dialog02() )
@ 46, 05 ADD BUTTON oBtn4 GROUP oGr BITMAP "C:\FWH\bitmaps\paste16.BMP" ;
SIZE 75, 20 MOSTLEFT round ;
action( Dialog03() )
oBtn2:cTooltip:="Este es el dialog 1" // by rolo
oBtn3:cTooltip:="Este es el dialog 2" // by rolo
oBtn4:cTooltip:="Este es el dialog 3" // by rolo
oBtn2:oCursor:=oCursor // by rolo
oBtn3:oCursor:=oCursor // by rolo
oBtn4:oCursor:=oCursor // by rolo
ADD GROUP oGr1 RIBBON oRBar TO OPTION 1 PROMPT "Font" WIDTH 205
@ 10, 05 ADD BUTTON oBtn5 GROUP oGr1 BITMAP "C:\FWH\bitmaps\bold16.bmp" GROUPBUTTON FIRST SIZE 25, 20 ROUND ;
ACTION( oBtn5:lSelected := !oBtn5:lSelected )
@ 10, 30 ADD BUTTON oBtn6 GROUP oGr1 BITMAP "C:\FWH\bitmaps\italic16.bmp" GROUPBUTTON SIZE 25, 20 ROUND ;
ACTION( oBtn6:lSelected := !oBtn6:lSelected )
@ 10, 55 ADD BUTTON oBtn7 GROUP oGr1 BITMAP "C:\FWH\bitmaps\underline16.bmp" GROUPBUTTON SIZE 35, 20 ROUND Popup
@ 10, 90 ADD BUTTON oBtn8 GROUP oGr1 BITMAP "C:\FWH\bitmaps\strikethru16.bmp" GROUPBUTTON SIZE 25, 20 ROUND;
ACTION( oBtn8:lSelected := !oBtn8:lSelected )
@ 10, 115 ADD BUTTON oBtn9 GROUP oGr1 BITMAP "C:\FWH\bitmaps\subindex16.bmp" GROUPBUTTON SIZE 25, 20 ROUND;
ACTION( oBtn9:lSelected := !oBtn9:lSelected, oBtn10:lSelected := .f., oBtn10:Refresh() )
@ 10, 140 ADD BUTTON oBtn10 GROUP oGr1 BITMAP "C:\FWH\bitmaps\superindex16.bmp" GROUPBUTTON SIZE 25, 20 ROUND ;
ACTION( oBtn10:lSelected := !oBtn10:lSelected, oBtn9:lSelected := .f., oBtn9:Refresh() )
@ 10, 165 ADD BUTTON oBtn11 GROUP oGr1 BITMAP "C:\FWH\bitmaps\casing16.bmp" GROUPBUTTON END SIZE 35, 20 ROUND POPUP
@ 40, 05 ADD BUTTON oBtn12 GROUP oGr1 BITMAP "C:\FWH\bitmaps\hilight16.bmp" GROUPBUTTON FIRST SIZE 35, 20 ROUND POPUP
@ 40, 40 ADD BUTTON oBtn13 GROUP oGr1 BITMAP "C:\FWH\bitmaps\fontcolor16.bmp" GROUPBUTTON END SIZE 35, 20 ROUND POPUP
@ 40, 100 ADD BUTTON oBtn14 GROUP oGr1 BITMAP "C:\FWH\bitmaps\fontsizeincrease16.bmp" GROUPBUTTON FIRST SIZE 25, 20 ROUND
@ 40, 125 ADD BUTTON oBtn15 GROUP oGr1 BITMAP "C:\FWH\bitmaps\fontsizedecrease16.bmp" GROUPBUTTON END SIZE 25, 20 ROUND
@ 40, 175 ADD BUTTON oBtn16 GROUP oGr1 BITMAP "C:\FWH\bitmaps\style16.bmp" SIZE 25, 20 ROUND BORDER
oBtn5:cTooltip:=" Este es Boton 1"
oBtn6:cTooltip:=" Este es Boton 2"
oBtn7:cTooltip:=" Este es Boton 3"
oBtn8:cTooltip:=" Este es Boton 4"
oBtn9:cTooltip:=" Este es Boton 5"
oBtn10:cTooltip:="Este es Boton 6"
oBtn11:cTooltip:="Este es Boton 7"
oBtn12:cTooltip:="Este es Boton 8"
oBtn13:cTooltip:="Este es Boton 9"
oBtn14:cTooltip:="Este es Boton 10"
oBtn15:cTooltip:="Este es Boton 11"
oBtn16:cTooltip:="Este es Boton 12"
oBtn5:oCursor:=oCursor
oBtn6:oCursor:=oCursor
oBtn7:oCursor:=oCursor
oBtn8:oCursor:=oCursor
oBtn9:oCursor:=oCursor
oBtn10:oCursor:=oCursor
oBtn11:oCursor:=oCursor
oBtn12:oCursor:=oCursor
oBtn13:oCursor:=oCursor
oBtn14:oCursor:=oCursor
oBtn15:oCursor:=oCursor
oBtn16:oCursor:=oCursor
ADD GROUP oGr2 RIBBON oRBar TO OPTION 1 PROMPT "Exit" width 70 // BITMAP "..\bitmap\fivetech.bmp"
@ 15, 20 ADD BUTTON oBtn4 GROUP oGr2 BITMAP "..\bitmaps\32x32\quit.BMP" ;
SIZE 34,52 PROMPT "Exit" action( oWnd:End())
oBtn4:cTooltip:="Este es Boton de Salida"
oBtn4:oCursor:=oCursor
SET MESSAGE OF oWnd TO "Testing FWH own Class RibbonBar" ;
CENTERED CLOCK KEYBOARD 2007
WndCenter(oWnd:hWnd)
ACTIVATE WINDOW oWnd ON INIT Dialog01() // MAXIMIZED
oRBar:End()
return nil
Procedure Dialog01()
LOCAL aCoords:=GetCoors(oWnd:oWndClient), oBrush, oGet, cTxtGet:="Get in Dialog 01"
LOCAL oFont1, oBmpAlpha
LOCAL lEscapa:=.F.
HideDlg( 1 )
if ValType(oDlgRB[1]) <> "O"
oBmpAlpha:=TImage():Define(, "..\Bitmaps\AlphaBmp\World.bmp" )
DEFINE FONT oFont1 NAME "Ms Sans Serif" SIZE 0,-8 BOLD
DEFINE BRUSH oBrush FILE "..\Bitmaps\BackGrnd\Stone.bmp"
DEFINE DIALOG oDlgRB[1] FROM 0,0 TO 538,782 OF oWnd:oWndClient PIXEL // COLORS RGB(0,0,0),RGB(255,255,255)
oDlgRB[1]:nStyle := nOR(WS_CHILD) // ,WS_THICKFRAME
oDlgRB[1]:oBrush := oBrush
oDlgRB[1]:lTransparent := .T.
@ 20,20 SAY "Some text bla bla bla in DIALOG 01" OF oDlgRB[1] PIXEL COLOR nRGB(0,0,125) FONT oFont1
@ 35,20 GET oGet VAR cTxtGet OF oDlgRB[1] PIXEL
ACTIVATE DIALOG oDlgRB[1] NOWAIT ; //CENTERED
ON INIT (oDlgRB[1]:Move(aCoords[1]+0,aCoords[2]+0,,,.T.));
ON PAINT (ABPaint( hDC,335,200, oBmpAlpha:hBitmap, 255 ));
VALID lEscapa
else
oDlgRB[1]:Show()
endif
Return
Procedure Dialog02()
LOCAL aCoords:=GetCoors(oWnd:oWndClient), oBrush, oGet, cTxtGet:="Get in Dialog 02"
LOCAL oFont1, oBmpAlpha
LOCAL lEscapa:=.F.
HideDlg( 2 )
if ValType(oDlgRB[2]) <> "O"
oBmpAlpha:=TImage():Define(, "..\Bitmaps\AlphaBmp\World.bmp" )
DEFINE FONT oFont1 NAME "Ms Sans Serif" SIZE 0,-8 BOLD
DEFINE BRUSH oBrush FILE "..\Bitmaps\BackGrnd\Stone.bmp"
DEFINE DIALOG oDlgRB[2] FROM 0,0 TO 538,782 OF oWnd:oWndClient PIXEL // COLORS RGB(0,0,0),RGB(255,255,255)
oDlgRB[2]:nStyle := nOR(WS_CHILD) // ,WS_THICKFRAME
oDlgRB[2]:oBrush := oBrush
oDlgRB[2]:lTransparent := .T.
@ 30,30 SAY "Some text bla bla bla in DIALOG 02" OF oDlgRB[2] PIXEL COLOR nRGB(0,0,125) FONT oFont1
@ 45,30 GET oGet VAR cTxtGet OF oDlgRB[2] PIXEL
ACTIVATE DIALOG oDlgRB[2] NOWAIT ; //CENTERED
ON INIT (oDlgRB[2]:Move(aCoords[1]+0,aCoords[2]+0,,,.T.));
ON PAINT (ABPaint( hDC,365,230, oBmpAlpha:hBitmap, 255 ));
VALID lEscapa
else
oDlgRB[2]:Show()
endif
Return
Procedure Dialog03()
LOCAL aCoords:=GetCoors(oWnd:oWndClient), oBrush, oGet, cTxtGet:="Get in Dialog 03"
LOCAL oFont1, oBmpAlpha
LOCAL lEscapa:=.F.
HideDlg( 3 )
if ValType(oDlgRB[3]) <> "O"
oBmpAlpha:=TImage():Define(, "..\Bitmaps\AlphaBmp\World.bmp" )
DEFINE FONT oFont1 NAME "Ms Sans Serif" SIZE 0,-8 BOLD
DEFINE BRUSH oBrush FILE "..\Bitmaps\BackGrnd\Stone.bmp"
DEFINE DIALOG oDlgRB[3] FROM 0,0 TO 538,782 OF oWnd:oWndClient PIXEL // COLORS RGB(0,0,0),RGB(255,255,255)
oDlgRB[3]:nStyle := nOR(WS_CHILD) // ,WS_THICKFRAME
oDlgRB[3]:oBrush := oBrush
oDlgRB[3]:lTransparent := .T.
@ 40,40 SAY "Some text bla bla bla in DIALOG 03" OF oDlgRB[3] PIXEL COLOR nRGB(0,0,125) FONT oFont1
@ 55,40 GET oGet VAR cTxtGet OF oDlgRB[3] PIXEL
ACTIVATE DIALOG oDlgRB[3] NOWAIT ; //CENTERED
ON INIT (oDlgRB[3]:Move(aCoords[1]+0,aCoords[2]+0,,,.T.));
ON PAINT (ABPaint( hDC,395,260, oBmpAlpha:hBitmap, 255 ));
VALID lEscapa
else
oDlgRB[3]:Show()
endif
Return
Procedure HideDlg( nDlg )
LOCAL i:=1
for i:=1 TO Len(oDlgRB)
if ValType(oDlgRB[i])=="O"
oDlgRB[i]:Hide()
endif
next
Return
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: D.Fernandez, Google [Bot] and 20 guests