#Include "FiveWin.ch"
#include "constant.ch"
Static oDlg,oUrlink,oSay[6],oBarOpenWithlist
function Test( cTitle, nTop, nLeft, nBottom, nRight, cBtnTitle, nItem, lCancel, cCapCan )
LOCAL cNamefile :="test.jpg"
LOCAL oFont, oBtnClose1, oBtnClose2, oBrush
LOCAL nWidth, nHeight
DEFAULT nBottom := 33,;
nRight := 75.0,;
cTitle := "Test Url", ;
cBtnTitle := "&OK", ;
cCapCan := "&CANCEL",;
nItem := 1, ;
lCancel := .T.
nWidth = Max( nRight * DLG_CHARPIX_W, 180 )
nHeight = nBottom * DLG_CHARPIX_H
DEFINE FONT oFont NAME GetSysFont() SIZE 0, -9
DEFINE BRUSH oBrush GRADIENT { { 0.4, nRGB( 75, 144, 223 ), nRGB( 41, 85, 145 ) },;
{ 0.6, nRGB( 24, 61, 118 ), nRGB( 50, 95, 158 ) } }
SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )
DEFINE DIALOG oDlg SIZE nWidth, nHeight PIXEL BRUSH oBrush ;
TITLE cTitle FONT oFont ;
STYLE nOr( WS_OVERLAPPED,WS_THICKFRAME,WS_SYSMENU,WS_MAXIMIZEBOX, 0 )
oDlg:lTransparent := .F.
@ 100,10 SAY oSay[4] PROMPT cNamefile of oDlg SIZE 120,10 UPDATE
oBarOpenWithlist:= TUrlLink():New( 100, 20, oDlg, .t., .f., oFont, "Apri con", "Apri con" )
oBarOpenWithlist:SetColor( CLR_WHITE, CLR_BLACK )
oBarOpenWithlist:nClrOver = CLR_BLACK
oDlg:bResized := {||Rinfresca_oDlgallegati() }
IF lCancel
@ nHeight / 2 - 30, nWidth / 2 - 41 BUTTON oBtnClose1 PROMPT cCapCan DEFAULT SIZE 36, 13 PIXEL ;
ACTION (nItem := 0, oDlg:End()) UPDATE
ENDIF
@ nHeight / 2 - 30, If( lCancel, 5, nWidth / 2 - 41 ) BUTTON oBtnClose2 PROMPT cBtnTitle DEFAULT SIZE 36, 13 PIXEL ;
ACTION oDlg:End() UPDATE
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
RETU NIL
function Rinfresca_oDlgallegati()
oSay[4]:nTop:= 10
oSay[4]:nLeft:= 10
oBarOpenWithlist:ntop:=oSay[4]:nTop
oBarOpenWithlist:nleft:= oSay[4]:nWidth+18
oBarOpenWithlist:refresh()
return nil