Hyper LexiconImplementing Hyper Links in PowerBuilder |
Last Updated 06 Jan 1998
Send me your comments |
Click here to download Hyper Lexicon: hyperlex.zip, 22kb, PB4, Windows 3.x/Windows95 |
Hyper Lexicon is an example application which demonstrates how to create Hyper Links in PowerBuilder. Hyper Lexicon presents the user with a list of terms and their meanings. The meaning of a term can contain links to other terms. Such terms are shown as Hyper Links. When the user clicks on an hyper linked term, the application automatically 'jumps' to the meaning of the clicked term. |
What I am actually developing is an online dictionary for which I want the user to be able to click highlighted words (i.e. hot spots) in the definitions and get (i.e. jump to) the definition for the clicked words. In fact the definitions are not displayed in data windows but in multiline edit controls.
For example:
Call
1. Short for call option.
2. An option whereby the issuer of a bond is given a right of redemption
before maturity, at a given price and on a given date.
When the user clicks "option" he automatically gets the definition of the word "option". All such words are currently preceded by a "*" in my database. How can I tell PB4 that all words preceded by a "*" must be turned into hot spots ?
Click here to see the entire post and replies...
While developing this mechanism, a major hurdle I faced was with correctly
sizing a field while plotting it and then positioning it accurately with
respect to the previous field. The problem is - how does one find out the
width of a string for a given font when it is displayed in a column. I
had almost given up had it not been for another post on PB-L. Many thanks
to Arthur Hefti <arthur@CATSOFT.CH> for his uo_textwidth.
I have used uo_textwidth to determine the length of a column in PBUs if
it has to display a given string.
Date: Fri, 19 Dec 1997 07:23:31 +0100
From: Martine Guebel <martine.guebel@WRITETC.COM>
Subject: Hotspots in PB4
Hi PB gurus,
As I didn't receive much feeback from my previous attempt, I have taken
the liberty to ask again:
does anyone of you knows how I can create hotspots on part of the
strings displayed in a datawindow in PB4 ?
Thanks for your input.
___
Write! Technical Communications
Martine GUEBEL
Tel.: + (32) 2 714 42 82
Fax : + (32) 2 714 42 22
E-mail : mgu@writetc.com
Website : http://www.writetc.com
----------------------------------------------
Date: Sat, 20 Dec 1997 11:38:22 +0500
From: Jiggy <jiggys@USA.NET>
Subject: Re: Hotspots in PB4
Martine,
I am not sure exactly what
sort of HotSpots you want to create in your DW -
1. Do you want a particular part of the DW, say a picture, to be a
HotSpot,
which when clicked would initiate some action,OR
2. Do you want some text/column to act as hyperlinks, much like HTML
or
Windows Help.
In either case, here is the general approach you can consider -
1. Right click the desired HotSpot object, i.e Picture/Text/Column,
and set
the Pointer Property to something that looks like the hyperlink Hand
pointer. You might have to build the ICO cursor resource or use the
ones
supplied.
2. In the clicked event of the datawindow check the object which was
clicked on using the GetObjectAtPointer() function. Now depending upon
the
object, initiate the desired processing.
Jiggy
-------------------------------------------------
Date: Mon, 22 Dec 1997 07:28:22 +0100
From: "Martine Guebel" <martine.guebel@writetc.com>
Reply-To: mgu@writetc.com
Organization: Write! Technical Communication
To: jiggys@USA.NET
Subject: Hotspots (again)
Hi Jiggy,
Thanks for answering my question about hotspots in PB4.
I know I was not clear enough. What I am actually developing is an
online dictionary for which I want the user to be able to click highlighted
words (i.e. hotspots) in the definitions and get (i.e. jump to) the definition
for the clicked words. In fact the definitions are not displayed in data
windows but in multiline edit controls.
For example:
Call
1. Short for call option. 2. An option whereby the issuer of
a bond is given a right of redemption before maturity, at a given price
and on a given date.
>> When the user clicks "option" he automatically gets the definition of the word "option". All such words are currently preceded by a "*" in my database. How can I tell PB4 that all words preceded by a "*" must be turned into hotspots ?
Thanks again for investigating. It would be the best Christmas present
for me if you could find an answer.
Martine
----------------------------------------------------------------------------