Hola a todo
Estoy buscando en samples y en el foro algún tema relativo a poner ctooltip en los items de un combobox, pero no he visto nada. ¿Se puede poner?
Gracias
// \SAMPLES\RAMONCMB.PRG - 18/11/2021 - kapiabafwh@gmail.com - Yes sir.
#Include "FiveWin.ch"
#Define CLR_PINK nRGB( 255, 128, 128 )
#Define CLR_NBLUE nRGB( 128, 128, 192 )
#define CLR_MSPURPLE nRGB( 0, 120, 215 )
#define CLR_MSRED nRGB( 232, 17, 35 )
#define CLR_MSGRAY nRGB( 229, 229, 229 )
FUNCTION Main()
LOCAL oDlg, oCbx, cTitle, oSayItem, oFnt, oFont, oSayFive, cTextFive
LOCAL cText := SPACE(200), oTextBras, cTextBras, aGrad, oOk, oExit
cTitle := "Ramon: DropDown ComboBox"
cTextFive := "Ramon: DropDown ComboBox - FiveWin"
cTextBras := "FiveWin Brasil The Best .and. Ramon"
SET _3DLOOK ON
SetBalloon( .T. ) // Balloon shape required for tooltips
SkinButtons()
aGrad := { { 1, CLR_WHITE, CLR_HCYAN } }
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -28 BOLD
DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 00, -16 BOLD
DEFINE DIALOG oDlg TITLE cTitle FROM 110, 1 TO 450, 600 PIXEL ;
GRADIENT aGrad
oDlg:lHelpIcon := .F.
@ 10, 10 COMBOBOX oCbx VAR cText STYLE CBS_DROPDOWN ;
SIZE 100, 460 OF oDlg PIXEL HEIGHTGET 20 FONT oFnt ;
ITEMS { "Ramon Forum ESP", "FiveWin Brasil", "FiveWin Mundial", ;
"Corinthians SP ", "Palmeiras SP ", "Flamengo Rio ", ;
"Marrocos Afrik ", "Brasil Mi Amor", "Estados Unidos ", ;
"Canadian Air ", "Espanha Bella ", "Argentina Enemy" } ;
ON CHANGE( oDlg:SetText( cTitle + " - " + cText ), ;
oSayItem:SetText( cText ) )
oCbx:cToolTip := { || MyToolTip_Cbx( oCbx:nAt, cText ) }
@ 10, 120 SAY oSayItem VAR cText SIZE 150, 20 OF oDlg PIXEL FONT oFont ;
COLORS CLR_PINK, CLR_WHITE TRANSPARENT
@ 40, 120 SAY oSayFive VAR cTextFive SIZE 150, 50 OF oDlg PIXEL FONT oFont ;
COLORS CLR_MSPURPLE, CLR_WHITE TRANSPARENT
@ 80, 120 SAY oTextBras VAR cTextBras SIZE 150, 50 OF oDlg PIXEL FONT oFont ;
COLORS CLR_MSRED, CLR_WHITE TRANSPARENT
@ 145, 100 BUTTON oOk PROMPT "&Ok" SIZE 50, 14 OF oDlg PIXEL ;
ACTION( oDlg:End() )
@ 145, 160 BUTTON oExit PROMPT "&Salida" SIZE 50, 14 OF oDlg PIXEL ;
ACTION( oDlg:End() ) DEFAULT CANCEL
SET FONT OF oOk TO oFnt
SET FONT OF oExit TO oFnt
ACTIVATE DIALOG oDlg CENTERED
oFnt:End()
oFont:End()
RETURN NIL
FUNCTION MyToolTip_Cbx( nOpt, cText )
LOCAL cRet
FWLOG nOpt
IF .NOT. EMPTY( cText ) // vacio no. YES, SIR!!
Do Case
Case nOpt = 1
MsgWait( cText, "Message1", 2 )
Case nOpt = 2
MsgWait( cText, "Message2", 2 )
Case nOpt = 3
MsgWait( cText, "Message3", 2 )
Case nOpt = 4
MsgWait( cText, "Message4", 2 )
Case nOpt = 5
MsgWait( cText, "Message5", 2 )
Case nOpt = 6
MsgWait( cText, "Message6", 2 )
Case nOpt = 7
MsgWait( cText, "Message7", 2 )
Case nOpt = 8
MsgWait( cText, "Message8", 2 )
Case nOpt = 9
MsgWait( cText, "Message9", 2 )
Case nOpt = 10
MsgWait( cText, "Message10", 2 )
Case nOpt = 11
MsgWait( cText, "Message11", 2 )
Case nOpt = 12
MsgWait( cText, "Message12", 2 )
EndCase
ENDIF
RETURN( cRet )
// FIN / END
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: nageswaragunupudi and 45 guests