FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour load a popmenu from urlink
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

load a popmenu from urlink

Posted: Tue Feb 21, 2023 12:15 PM
Code (fw): Select all Collapse
#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 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: 514
Joined: Sun Oct 16, 2005 03:32 AM

Re: load a popmenu from urlink

Posted: Wed Feb 22, 2023 09:26 PM
Code (fw): Select all Collapse
#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-25.12, xHarbour 1.3.1 Build 20241008, Borland C++7.70, PellesC, ADS 11.1***

Continue the discussion