Creates a jump in the document to a bookmark or element in the current document or to a different document.
Component | +--DhStyleBase | +--DhElement | +--DhBaseContainer | +--DhForm | +--DhHyperlink
package com.ms.wfc.html
public class DhHyperlink
extends DhForm
The following simple example shows how to create a hyperlink to another URL.
public class Class1 extends DhDocument { protected void initForm() { DhHyperlink h; this.add(new DhText("This is a link to the ")); this.add(h = new DhHyperlink("http://www.microsoft.com/visualj","Visual J++")); this.add(new DhText(" Web site.")); } }
To link to a bookmark on the current page, use the setJumpPoint method and pass it the DhElement associated with the element to jump to, as shown in the following sample:
public class Class1 extends DhDocument { protected void initForm() { DhHyperlink h; add(h = new DhHyperlink(null, "click me")); DhText t; for (int i = 0; i < 100; i++) newLine(); add(t=new DhText("jump here")); h.setJumpPoint(t); } }