load a popmenu from urlink

load a popmenu from urlink

Postby Silvio.Falconi » Tue Feb 21, 2023 12:15 pm

Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, oUrlLink

   DEFINE DIALOG oDlg RESOURCE "test" COLOR "N/B"

   oUrlLink = TUrlLink():Redefine( 100, oDlg,,, "www.fivetechsoft.com",, CLR_GRAY, CLR_WHITE, CLR_YELLOW, .T. )
   oUrlLink:bAction = { || ShowPopup() }

   ACTIVATE DIALOG oDlg CENTERED

return nil

Function ShowPopMenu()
local oMenu
MENU oMenu POPUP
MenuItem "one"
MenuItem "two"
endMenu
endmenu
return oMenu
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: load a popmenu from urlink

Postby Cgallegoa » Wed Feb 22, 2023 9:26 pm

Code: Select all  Expand view
#include "FiveWin.ch"
#include "URLLink.ch"

function Main()

   local oDlg, oUrlLink, oFont1

   DEFINE FONT oFont1 NAME "Verdana" SIZE 0,-18

   DEFINE DIALOG oDlg SIZE 800,400 COLOR "N/B" PIXEL TRUEPIXEL FONT oFont1

  // oUrlLink = TUrlLink():Redefine( 100, oDlg,,, "www.fivetechsoft.com",, CLR_GRAY, CLR_WHITE, CLR_YELLOW, .T. )
   @ 10,10 URLLINK oUrlLink OF oDlg PIXEL URL "www.fivetechsoft.com" FONT oFont1;
            CLRINIT nRGB(100,255,0) CLROVER nRGB(50,150,0)

   oUrlLink:bAction = { || ShowPopupMenu(oDlg, oUrlLink) }

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont1
return nil

Function ShowPopupMenu(oDlg, oUrlLink)
local oMenu, nRow := oUrlLink:nTop + oUrlLink:nHeight - 1
MENU oMenu POPUP
   MenuItem "one"
   MenuItem "two"
  // endMenu
endmenu

ACTIVATE POPUP oMenu OF oDlg AT nRow , 20  

return oMenu


Regards,
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 491
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 38 guests