#include "fivewin.ch"
#define ORANGE RGB(255,165,0)
#define LIGHTGREEN RGB(144,238,144)
#define RED RGB(255,0,0)
#define WHITE RGB(255,255,255)
#define ROYALBLUE RGB(65,105,225)
Function test()
Local oDlg
Local oFolder
Local oBtnSearch
DEFINE DIALOG oDlg SIZE 1180,650 PIXEL ;
TITLE "test" ;
STYLE nOR( WS_CAPTION, WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME )
@ 1, 0 FOLDEREX oFolder OF oDlg SIZE oDlg:nWidth - 585, oDlg:nHeight - 390 PIXEL ;
PROMPT "Prenotazioni","Pagamenti","Familiari"
@ 08, 10 BTNBMP oBtnSearch FILENAME "INVOICE_CERCA" ; // 355
SIZE 15,12 PIXEL OF oFolder:aDialogs[1] NOBORDER ;
action Messaggio(1, oFolder:aDialogs[ 1 ],,oBtnSearch) // oDlg
oBtnSearch:lTransparent:=.t.
oDlg:bResized := <||
local oRect
oRect := oDlg:GetCliRect()
oFolder:nWidth := oRect:nRight-2
oFolder:nHeight := oRect:nBottom-160
//oBtnSearch:nTop := oRect:nTop+5
//oBtnSearch:nLeft := oRect:nleft+550
oFolder:Default()
return nil
>
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( Messaggio( 1, oFolder:aDialogs[ 1 ],,oBtnSearch) )
// ON INIT (eval( oDlg:bResized ) ,Messaggio(1,oDlg,,oBtnSearch) )
return nil
//------------------------------------------------------------------------------------------------//
Function Messaggio(numero,odlg,nValore,obj)
local nColor1,nColor2,nColortxt,cTesto,cImage
local nWidth :=420
local nHeight:= 35
local x,y,oRect
DEFAULT nValore := 10
Do case
case Numero =1
nColor1 := ORANGE
nColor2 := ORANGE
nColortxt:= WHITE
cTesto:= "Elemento non disponibile! "
cImage:= "CHECK3"
case Numero = 2
nColor1 := LIGHTGREEN
nColor2 := LIGHTGREEN
nColortxt:= ROYALBLUE
cTesto:= "Elemento disponibile!"
cImage:= "CHECK2"
case Numero =3
nColor1 := ORANGE
nColor2 := RED
nColortxt:= WHITE
cTesto:= ("Attenzione !!!Non è stata trovata nessuna tariffa! Si inserisce il valore € "+;
ltrim(str(nvalore))+". Controllare le tariffe")
cImage:= "XPALERT"
nWidth:= 740
nHeight:= 35
ENDCASE
MessageToast( 1, cTesto, cImage,;
nWidth, nHeight, oDlg, nColor1, nColor2, ;
nColortxt, , , .T., , .F., .F., .F., -10, 20 )
Return nil
//---------------------------------------------------------------------------------//
Function MessageToast( nType, cText, cBmp, nWidth, nHeight, oWnd, nClrPane, nClrPane2, ;
nClrText, nLev, nTime, lUp, bRet, lLeftP, lAlert, lShadow,;
nOffY, nOffX, nFont )
local oTip
local bInit
DEFAULT lLeftP := .t.
DEFAULT lUp := .T.
DEFAULT nType := 1
DEFAULT lAlert := .F.
DEFAULT lShadow := .T.
DEFAULT nLev := 180
DEFAULT nTime := 4000
DEFAULT nOffY := 0
DEFAULT nOffX := 0
DEFAULT nFont := -10
/*
oTip := TToast():NewToast( nType, cText, cBmp, nWidth, nHeight, oWnd,;
nClrPane, nClrPane2, nClrText,;
nLev, nTime, lUp, lLeftP,lAlert, lShadow,;
nOffY, nOffX, nFont )
*/
oTip := TToast():NewToast( nType, cText, cBmp, nWidth, nHeight, oWnd, ;
nClrPane, nClrPane2,nClrText, nLev, nTime, lUp, bRet, lLeftp, .T., .T., nOffY, nOffX )
oTip:nWRadio := 6
oTip:nHRadio := 6
oTip:lBtnClose := .f.
oTip:lBtnSetup := .f.
//oTip:bValid := { || TipTransHide( oTip ), .T. }
oTip:ActivaAlert()
return nil
function O2a( cCadena ) ; return Oemtoansi( cCadena )