FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse with UrlLink
Posts: 514
Joined: Sun Oct 16, 2005 03:32 AM
xBrowse with UrlLink
Posted: Tue Feb 27, 2024 05:21 PM

Code (fw): Select all Collapse
#include "FiveWin.ch"
Function Inicio()
LOCAL oDlg, oBrw, oFont[2]
LOCAL aData := {{"xHarbour"        , "http://www.xharbour.org/"           , 1},;
                {"Cualquier cosa"  , "Ejecuta proceso Tres"               , 3},;
                {"Fivetech"        , "www.fivetechsoft.com"               , 1},;
                {"Forum Fivetecht" , "https://forums.fivetechsupport.com" , 1},;
                {"Tarea adicional" , "Ejecuta proceso Dos"                , 2}}

DEFINE FONT oFont[1] NAME "TAHOMA" SIZE 0,-14
DEFINE FONT oFont[2] NAME "TAHOMA" SIZE 0,-14 UNDERLINE
DEFINE DIALOG oDlg SIZE 537,300 PIXEL TRUEPIXEL TITLE "xBrowse con UrlLink"

    @ 20,20 XBROWSE oBrw DATASOURCE aData OF oDlg PIXEL SIZE 500,200 AUTOSORT AUTOCOLS LINES CELL;
                 HEADERS "Empresa / Mensaje", "URL / Acción" COLSIZES {150,300} FONT oFont[1]
   
          WITH OBJECT oBrw:aCols[2]
              :bLDClickData := { || Opciones(aData, oBrw) }
              :oDataFont := {|| iif( aData[oBrw:nArrayAt, 3] == 1, oFont[2], oFont[1]) }
              :aClrText  := {|| Iif( aData[oBrw:nArrayAt, 3] == 1, nRGB(50,50,200), nRGB(0,0,0) )}
              :bCellToolTip := { |oCol| {"Doble clic para abrir enlace o ejecutar Proceso","Selecciona:"} }
         END
   
         oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY
         oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY
         oBrw:CreateFromCode()
   
   ACTIVATE DIALOG oDlg CENTERED

Return(NIL)
//-------------------------------------------------//

Function Opciones(aData, oBrw)
   LOCAL nOpcion := aData[oBrw:nArrayAt, 3]
   DO CASE
      CASE nOpcion == 1
           Shellexecute( 0, "Open", aData[oBrw:nArrayAt, 2] )
      CASE nOpcion == 2
           Dos()
      CASE nOpcion == 3
           Tres()
   ENDCASE
Return(NIL)
//-------------------------------------------------//

Function Dos()
   MsgInfo("Opción Dos")
Return(NIL)
//-------------------------------------------------//

Function Tres()
   MsgInfo("Opción Tres")
Return(NIL)
//-------------------------------------------------//
Question : How to assign a HAND cursor over a specific column ?

Regards,

Saludos,



Carlos Gallego



*** FWH-25.12, xHarbour 1.3.1 Build 20241008, Borland C++7.70, PellesC, ADS 11.1***

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: xBrowse with UrlLink
Posted: Wed Feb 28, 2024 08:25 AM

hay libertad de opinión ok pero ¿por qué creaste un tema nuevo cuando yo ya lo había hecho?

Lo siento pero quise decir algo más, no necesariamente tiene que abrir una URL en el Navegador (IE edge y chrome) sino la posibilidad de abrir un menú o una función específica es decir tener un objeto con la clase Turllink en lugar de "www". ..." ,solo así podríamos tener el efecto de color over con el mouse

oURL:= New( nTop, nLeft, oWnd, lPixel, lDesign, oFont, cMsg, cURL, cToolTip, nClrInit, nClrOver, nClrVisit, lTransp )

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: xBrowse with UrlLink
Posted: Wed Feb 28, 2024 05:43 PM
hay libertad de opinión ok pero ¿por qué creaste un tema nuevo cuando yo ya lo había hecho?
The topic was in response to a link from our friend Leandro. He asked a question and I responded with a humble proposal. However, since everything can be improved, I published the code to see if there are any more ideas. From now on, we will all have to think carefully about what we respond to so that you do not feel affected in one way or another:
https://forums.fivetechsupport.com/viewtopic.php?f=6&t=37846&hilit=silvio&sid=9688a2621bc7f1e8997cf690fe84f693

It's a pity that the topic upset you, although you made me remember the wonderful poem "Desiderata" by Max Ehrmann.
There is so much truth and depth in its opening lines, don't you think?

"Go placidly amid the noise and the haste, and remember what peace there may be in silence.
As far as possible, without surrender, be on good terms with all persons.
Speak your truth quietly and clearly; and listen to others, even to the dull and the ignorant; they too have their story.
Avoid loud and aggressive persons; they are vexatious to the spirit."


Closed topic. Life is a beautiful journey. Let's enjoy it to the fullest.
Enjoy it: https://www.youtube.com/watch?v=i2DoBy3TlGA&ab_channel=Music4allofUClassics%21


El tema fué en respuesta a un link del amigo Leandro. Hizo una consulta y yo le respondí con una humilde propuesta, pero como todo es suceptible de mejorarse, publiqué el código para ver si hay más ideas. De ahora en adelante todos tendremos que meditar mucho lo que respondemos para que no te sientas afectado de una u otra manera:
https://forums.fivetechsupport.com/viewtopic.php?f=6&t=37846&hilit=silvio&sid=9688a2621bc7f1e8997cf690fe84f693

Lástima que el tema te haya molestado, aunque me hiciste recordar el maravilloso poema "Desiderata" de Max Ehrmann.
En sus primeros versos hay tanta verdad y profundidad, no te parece ?

"Camina plácido entre el ruido y la prisa, y recuerda que la paz se puede encontrar en el silencio.
En cuanto te sea posible y sin rendirte, mantén buenas relaciones con todas las personas.
Enuncia tu verdad de una manera serena y clara, y escucha a los demás, incluso al torpe e ignorante, también ellos tienen su propia historia.
Evita a las personas ruidosas y agresivas, ya que son un fastidio para el espíritu."


Tema cerrado. La vida es un viaje hermoso. Disfrutémoslo al máximo.
Disfrútalo: https://www.youtube.com/watch?v=J7UApP3nGkU&ab_channel=giorgiorutaaprile

Saludos,



Carlos Gallego



*** FWH-25.12, xHarbour 1.3.1 Build 20241008, Borland C++7.70, PellesC, ADS 11.1***

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: xBrowse with UrlLink
Posted: Wed Feb 28, 2024 09:00 PM
Cgallegoa wrote:
hay libertad de opinión ok pero ¿por qué creaste un tema nuevo cuando yo ya lo había hecho?
The topic was in response to a link from our friend Leandro. He asked a question and I responded with a humble proposal. However, since everything can be improved, I published the code to see if there are any more ideas. From now on, we will all have to think carefully about what we respond to so that you do not feel affected in one way or another:
https://forums.fivetechsupport.com/viewtopic.php?f=6&t=37846&hilit=silvio&sid=d387f35cf4a1eb10c8e2dd46c477af78

It's a pity that the topic upset you, although you made me remember the wonderful poem "Desiderata" by Max Ehrmann.
There is so much truth and depth in its opening lines, don't you think?

"Go placidly amid the noise and the haste, and remember what peace there may be in silence.
As far as possible, without surrender, be on good terms with all persons.
Speak your truth quietly and clearly; and listen to others, even to the dull and the ignorant; they too have their story.
Avoid loud and aggressive persons; they are vexatious to the spirit."


Closed topic. Life is a beautiful journey. Let's enjoy it to the fullest.
Enjoy it: https://www.youtube.com/watch?v=i2DoBy3TlGA&ab_channel=Music4allofUClassics%21


El tema fué en respuesta a un link del amigo Leandro. Hizo una consulta y yo le respondí con una humilde propuesta, pero como todo es suceptible de mejorarse, publiqué el código para ver si hay más ideas. De ahora en adelante todos tendremos que meditar mucho lo que respondemos para que no te sientas afectado de una u otra manera:
https://forums.fivetechsupport.com/viewtopic.php?f=6&t=37846&hilit=silvio&sid=d387f35cf4a1eb10c8e2dd46c477af78

Lástima que el tema te haya molestado, aunque me hiciste recordar el maravilloso poema "Desiderata" de Max Ehrmann.
En sus primeros versos hay tanta verdad y profundidad, no te parece ?

"Camina plácido entre el ruido y la prisa, y recuerda que la paz se puede encontrar en el silencio.
En cuanto te sea posible y sin rendirte, mantén buenas relaciones con todas las personas.
Enuncia tu verdad de una manera serena y clara, y escucha a los demás, incluso al torpe e ignorante, también ellos tienen su propia historia.
Evita a las personas ruidosas y agresivas, ya que son un fastidio para el espíritu."


Tema cerrado. La vida es un viaje hermoso. Disfrutémoslo al máximo.
Disfrútalo: https://www.youtube.com/watch?v=J7UApP3nGkU&ab_channel=giorgiorutaaprile
I don't feel impressed and as I have already written everyone has the right and freedom of expression, but dear sir it seems strange to me that you too, like someone else in this forum, when I insert a specific topic, immediately a topic with the same subject is inserted or something similar related to my previous topic. I repeat, everyone has freedom of expression but I am starting to support a certain suspicion, that is, an incitement towards me because it has been reiterated over time by various subjects in these forums, it is certainly not his fault but he must admit that I have some suspicions
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

Continue the discussion