How to provide a clickable URL? - Motif

This is a discussion on How to provide a clickable URL? - Motif ; I need to create an XmLabel that will contain a URL. When the URL is clicked I want to launch netscape with the URL loaded. I already know how to launch netscape and get it to load a specific page. ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: How to provide a clickable URL?

  1. How to provide a clickable URL?


    I need to create an XmLabel that will contain a URL. When the URL is clicked
    I want to launch netscape with the URL loaded.

    I already know how to launch netscape and get it to load a specific page.
    What I don't know is how to trap a click on text that I've identified to be a
    URL. I also want the URL text to have some kind of different apperance so
    that it is obvious it can be clicked.

    TIA!

    ....Jake

    --
    Jake Colman
    Sr. Applications Developer
    Principia Partners LLC
    Harborside Financial Center
    1001 Plaza Two
    Jersey City, NJ 07311
    (201) 209-2467
    www.principiapartners.com

  2. Re: How to provide a clickable URL?

    http://www.nsl.fr



    "Jake Colman" a écrit dans le message de
    news:76mzx85ll6.fsf@newjersey.ppllc.com...
    >
    > I need to create an XmLabel that will contain a URL. When the URL is

    clicked
    > I want to launch netscape with the URL loaded.
    >
    > I already know how to launch netscape and get it to load a specific page.
    > What I don't know is how to trap a click on text that I've identified to

    be a
    > URL. I also want the URL text to have some kind of different apperance so
    > that it is obvious it can be clicked.
    >
    > TIA!
    >
    > ...Jake
    >
    > --
    > Jake Colman
    > Sr. Applications Developer
    > Principia Partners LLC
    > Harborside Financial Center
    > 1001 Plaza Two
    > Jersey City, NJ 07311
    > (201) 209-2467
    > www.principiapartners.com




  3. Re: How to provide a clickable URL?

    Jake Colman wrote in
    news:76mzx85ll6.fsf@newjersey.ppllc.com:
    > I need to create an XmLabel that will contain a URL. When the URL is
    > clicked I want to launch netscape with the URL loaded.


    There are several ways to do this. The simplest is to just use a push button
    widget to display your text.

    Ken Lee, http://www.rahul.net/kenton/

  4. Re: How to provide a clickable URL?

    >>>>> "PC" == Pascal COLEAUX writes:

    PC> http://www.nsl.fr

    How does that answer my question? Which widget will do this for me?

    --
    Jake Colman
    Sr. Applications Developer
    Principia Partners LLC
    Harborside Financial Center
    1001 Plaza Two
    Jersey City, NJ 07311
    (201) 209-2467
    www.principiapartners.com

  5. Re: How to provide a clickable URL?

    >>>>> "KL" == Ken Lee writes:

    KL> Jake Colman wrote in
    KL> news:76mzx85ll6.fsf@newjersey.ppllc.com:

    >> I need to create an XmLabel that will contain a URL. When the URL is
    >> clicked I want to launch netscape with the URL loaded.


    KL> There are several ways to do this. The simplest is to just use a push
    KL> button widget to display your text.

    But can this appear seamless? I have an XmLabel that reads

    "blah blah blah. Click here: http://blach.foo.com"

    I want the URL to be underlined and to appear ti be a seamless part of the
    text. Can a pushbutton be placed that way adjacent to the XmLabel?

    --
    Jake Colman
    Sr. Applications Developer
    Principia Partners LLC
    Harborside Financial Center
    1001 Plaza Two
    Jersey City, NJ 07311
    (201) 209-2467
    www.principiapartners.com

  6. Re: How to provide a clickable URL?

    Pascal COLEAUX wrote:
    > http://www.nsl.fr
    >
    >
    >
    > "Jake Colman" a écrit dans le message de
    > news:76mzx85ll6.fsf@newjersey.ppllc.com...
    >
    >>I need to create an XmLabel that will contain a URL. When the URL is

    >
    > clicked
    >
    >>I want to launch netscape with the URL loaded.
    >>
    >>I already know how to launch netscape and get it to load a specific page.
    >>What I don't know is how to trap a click on text that I've identified to

    >
    > be a
    >
    >>URL.


    If it's text that causes an action when clicked, then it's a PushButton,
    not a label. You will have less problems adapting the look of a PB than
    changing the actions of a label! Basically, set the ShadowThickness to
    zero, and change the background color to that of the containing widget.

    > I also want the URL text to have some kind of different apperance so
    >>that it is obvious it can be clicked.


    Why not use the convention common in broswers, ie underlined blue text?

    >>
    >>TIA!
    >>
    >>...Jake
    >>
    >>--
    >>Jake Colman
    >>Sr. Applications Developer
    >>Principia Partners LLC
    >>Harborside Financial Center
    >>1001 Plaza Two
    >>Jersey City, NJ 07311
    >>(201) 209-2467
    >>www.principiapartners.com

    >
    >
    >



    --
    Michel Bardiaux
    Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
    Tel : +32 2 790.29.41

  7. Re: How to provide a clickable URL?

    >>>>> "MB" == Michel Bardiaux writes:

    MB> If it's text that causes an action when clicked, then it's a
    MB> PushButton, not a label. You will have less problems adapting the look
    MB> of a PB than changing the actions of a label! Basically, set the
    MB> ShadowThickness to zero, and change the background color to that of
    MB> the containing widget.

    Ok. That seems to work fine. If I don't want Motif to show focus for this
    button/label, can I just turn off traversal? Or will that also not allow me
    to click on it with the mouse?

    >> I also want the URL text to have some kind of different apperance so
    >>> that it is obvious it can be clicked.


    MB> Why not use the convention common in broswers, ie underlined blue text?

    I know how to change the color. But how do I make it underlined?

    --
    Jake Colman
    Sr. Applications Developer
    Principia Partners LLC
    Harborside Financial Center
    1001 Plaza Two
    Jersey City, NJ 07311
    (201) 209-2467
    www.principiapartners.com

  8. Re: How to provide a clickable URL?

    Jake Colman wrote:
    >>>>>>"MB" == Michel Bardiaux writes:

    >
    >
    > MB> If it's text that causes an action when clicked, then it's a
    > MB> PushButton, not a label. You will have less problems adapting the look
    > MB> of a PB than changing the actions of a label! Basically, set the
    > MB> ShadowThickness to zero, and change the background color to that of
    > MB> the containing widget.
    >
    > Ok. That seems to work fine. If I don't want Motif to show focus for this
    > button/label, can I just turn off traversal? Or will that also not allow me
    > to click on it with the mouse?


    I dunno. If you try, tell us!

    >
    > >> I also want the URL text to have some kind of different apperance so
    > >>> that it is obvious it can be clicked.

    >
    > MB> Why not use the convention common in broswers, ie underlined blue text?
    >
    > I know how to change the color. But how do I make it underlined?
    >

    See man XmRenderTable for an example of altering the underline style on
    a label, and man XmRendition for the list of available underline style.

    HaND,
    --
    Michel Bardiaux
    Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
    Tel : +32 2 790.29.41

+ Reply to Thread