FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour urllink
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
urllink
Posted: Thu Jun 25, 2015 05:03 PM

can open a mmenupopup with a turl control ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: urllink
Posted: Sat Jun 27, 2015 07:13 AM

Silvio,

Use oURLLink:bAction := { || ... }

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: urllink
Posted: Sat Jun 27, 2015 07:26 AM
Antonio,
I have problem to show the control into a dialog :

the control there is but I cannot see it

Code (fw): Select all Collapse
Static oAllegati,oUrlink,oSay[6],oBarOpenWithlist


Function test()
   Local nBottom   := 33
   Local nRight    := 75
   Local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local nHeight := nBottom * DLG_CHARPIX_H
   Local cNamefile :="test.jpg"
   Local oFontNormal:= TFont():New( "Tahoma", 0, -9,,.F. )

   DEFINE DIALOG oAllegati  ;   //OF oParent
   TITLE "test url"   ;
   SIZE nWidth, nHeight  TRANSPARENT PIXEL
    
    oAllegati:nStyle    := nOr( WS_OVERLAPPED,WS_THICKFRAME,WS_SYSMENU,WS_MAXIMIZEBOX,   0  )

      @ 100,10 SAY oSay[4] PROMPT  cNamefile      of oAllegati SIZE 120,10   UPDATE


     oBarOpenWithlist:= TUrlLink():New( 100, 20, oAllegati, .t., .f., oFontNormal, "Apri con", "Apri con" )
     oBarOpenWithlist:SetColor( CLR_WHITE, CLR_BLACK )
     oBarOpenWithlist:nClrOver = CLR_BLACK
    


            oAllegati:bResized := {||Rinfresca_oDlgallegati() }


   ACTIVATE DIALOG oAllegati CENTERED
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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: urllink
Posted: Mon Jun 29, 2015 06:49 AM
Antonio,
Important...
It not run on DIALOG but only on Window
because the Turllink class need SetWndDefault( Self ) to add on New method !!!!
now I see the control ....
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: urllink
Posted: Mon Jun 29, 2015 07:45 AM

Silvio,

function SetWndDefault() is to be used with classes whose controls contains another controls.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: urllink
Posted: Mon Jun 29, 2015 08:09 AM

Sorry, I make a mistake
not run on dialog also
the urlink control there is but I not see it

How I can resolve it ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: urllink
Posted: Mon Jun 29, 2015 08:20 AM
Antonio,
Perhaps I found the error

when the dialog have the clausole TRASPARENT the url control link not run

how I can resolve it ? (I need to have trasparent clausole on Dialog )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: urllink
Posted: Mon Jun 29, 2015 01:11 PM
Complete, please.

Code (fw): Select all Collapse
#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
   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 DIALOG oDlg SIZE nWidth, nHeight PIXEL;
          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


João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: urllink
Posted: Mon Jun 29, 2015 02:08 PM

Kariha,
Why I must not make the dialog Trasparent with GRADIENT ?

I found a strange solution :
rem the Paint and Default methods from Turllink class and then it run also on dialog transparent with gradients ( this idea was sent from AntoninoP)

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: urllink
Posted: Mon Jun 29, 2015 02:10 PM
Silvio.Falconi wrote:Kariha,
Why I must not make the dialog Trasparent with GRADIENT ?

I found a strange solution :
rem the Paint and Default methods from Turllink class and then it run also on dialog transparent with gradients ( this idea was sent from AntoninoP)


Paint and Display!! :-) :-)
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: urllink
Posted: Mon Jun 29, 2015 02:23 PM

yes yes I am confused

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: urllink
Posted: Mon Jun 29, 2015 03:24 PM
Code (fw): Select all Collapse
#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


João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341

Continue the discussion