PictureHyperLink control

The PictureHyperLink control is a descendant of the Picture control. The URL property of the PictureHyperLink control enables you to provide a hot link to a Web page. When the user clicks the control, the user's Web browser opens to display the page you specify.

PictureHyperLink controls can contain images in the following formats:

  • Bitmaps, with .BMP or .RLE extensions

  • Windows metafiles, with the .WMF extension

  • GIF or animated GIF files, with the .GIF extension

  • JPEG files, with .JPEG or .JPG extensions

  • Portable Networks Graphics, with .PNG extension

Usage note

If you know that your users have Web browsers that support URL completion, you can enter a partial address, such as:

appeon.com

You can, of course, enter a complete address, such as:

http://www.appeon.com

Properties

PictureHyperLink property

Datatype

Description

AccessibleDescription

String

A description of the control and/or its purpose for use by accessibility tools such as readers for visually impaired users.

AccessibleName

String

A label that briefly describes the control, such as the text in a button or the name of a menu item.

AccessibleRole

AccessibleRole (enumerated)

Describes what kind of user interface element the control is.

Border

Boolean

Specifies whether the control has a border. Values are:

TRUE -- Control has a border.

FALSE -- Control does not have a border.

BorderStyle

BorderStyle (enumerated)

Specifies the style of the border of the control. Values are:

StyleBox!

StyleLowered!

StyleRaised!

StyleShadowBox!

BringToTop

Boolean

Specifies whether PowerBuilder moves the control to the top of the front-to-back order of the window. Values are:

TRUE -- Control moved to top.

FALSE -- Control not moved to top.

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

DragAuto

Boolean

Specifies whether PowerBuilder puts the control automatically into Drag mode. Values are:

TRUE -- When the control is clicked, the control is automatically in Drag mode.

FALSE -- When the control is clicked, the control is not automatically in Drag mode. You have to manually put the control into Drag mode by using the Drag function.

DragIcon

String

Specifies the name of the stock icon or the file containing the icon you want to display when the user drags the control (the ICO file). The default icon is a box the size of the control.

When the user drags the control, the icon displays when the control is over an area in which the control can be dropped (a valid drop area). When the control is over an area that is not a valid drop area, the No-Drop icon displays.

Enabled

Boolean

Specifies whether the control is enabled (can be selected). Values are:

TRUE -- Control can be selected.

FALSE -- Control cannot be selected.

FocusRectangle

Boolean

Specifies whether a dotted rectangle (focus rectangle) frames the picture when it has focus. Values are:

TRUE -- Control will be framed when it has focus.

FALSE -- Control will not be framed when it has focus.

Height

Integer

Specifies the height of the control, in PowerBuilder units.

Invert

Boolean

Specifies whether the control displays with its colors inverted. Values are:

TRUE -- Colors are inverted.

FALSE -- Colors are not inverted.

Map3DColors

Boolean

Specifies whether the system 3D colors are mapped to the control. Values are:

TRUE -- Colors are mapped.

FALSE -- Colors are not mapped.

OriginalSize

Boolean

Specifies whether the width and height properties of a bitmap image (picture) are set to their original values. Values are:

TRUE -- Width and height set to original values.

FALSE -- Existing width and height not changed.

In the Window painter, setting OriginalSize to true overrides the existing width and height.

PictureName

String

Specifies the name of the file that contains the picture. The file extension BMP, RLE, WMF, JPG, JPEG, or GIF is required.

Pointer

String

Specifies the name of the stock pointer or the file containing the pointer used for the control.

PowerTipText

Long

Specifies a PowerTip for the control.

TabOrder

Integer

Specifies the tab value of the picture within the window (0 means the user cannot tab to the control).

Tag

String

Specifies the tag value assigned to the control.

URL

String

Specifies the URL to open in the user's Web browser when the picture is clicked, provided no Clicked event is coded. The status text displays the URL when the mouse passes over the control.

Visible

Boolean

Specifies whether the control is visible. Values are:

TRUE -- Control is visible.

FALSE -- Control is not visible.

Width

Integer

Specifies the width of the control, in PowerBuilder units.

X

Integer

Specifies the X position (distance from the left edge of the window), in PowerBuilder units.

Y

Integer

Specifies the Y position (distance from the top of the window), in PowerBuilder units.


Events

PictureHyperLink event

Occurs

Clicked in PowerScript Reference

When the control is clicked (selected)

Constructor in PowerScript Reference

Immediately before the Open event occurs in the window

Destructor in PowerScript Reference

Immediately after the Close event occurs in the window

DoubleClicked in PowerScript Reference

When the control is double-clicked (selected and activated)

DragDrop in PowerScript Reference

When a dragged control is dropped on the control

DragEnter in PowerScript Reference

When a dragged control enters the control

DragLeave in PowerScript Reference

When a dragged control leaves the control

DragWithin in PowerScript Reference

When a dragged control is within the control

GetFocus in PowerScript Reference

Just before the control receives focus (before it is selected and becomes active)

Help in PowerScript Reference

When the user presses the F1 key or drags the context help button (question mark) from the title bar to a menu item or control

LoseFocus in PowerScript Reference

When the control loses focus (becomes inactive)

Other in PowerScript Reference

When a Windows message occurs that is not a PowerBuilder event

RButtonDown in PowerScript Reference

When the right mouse button is pressed on the control


Functions

PictureHyperLink function

Datatype returned

Description

ClassName in PowerScript Reference

String

Returns the name assigned to the control.

Drag in PowerScript Reference

Integer

Starts or ends the dragging of the control.

Draw in PowerScript Reference

Integer

Draws a picture in the parent window at a specified location.

GetContextService in PowerScript Reference

Integer

Creates a reference to a context-specific instance of the specified service.

GetParent in PowerScript Reference

PowerObject

Returns a reference to the name of the parent object.

Hide in PowerScript Reference

Integer

Makes the control invisible.

Move in PowerScript Reference

Integer

Moves the control to a specified location.

PointerX in PowerScript Reference

Integer

Returns the distance of the pointer from the left edge of the control.

PointerY in PowerScript Reference

Integer

Returns the distance of the pointer from the top of the control.

PostEvent in PowerScript Reference

Boolean

Adds an event to the end of the message queue for the control.

Print in PowerScript Reference

Integer

Prints the control.

Resize in PowerScript Reference

Integer

Changes the size of the control.

SetFocus in PowerScript Reference

Integer

Sets focus to the control.

SetPicture in PowerScript Reference

Integer

Constructs a new bitmap for the control.

SetPosition in PowerScript Reference

Integer

Specifies the position of the control in the front-to-back order of the window.

SetRedraw in PowerScript Reference

Integer

Controls automatic redrawing of the control after each change in its properties.

Show in PowerScript Reference

Integer

Makes the control visible.

TriggerEvent in PowerScript Reference

Integer

Triggers a specified event in the control and executes the script for the event.

TypeOf in PowerScript Reference

Object

Returns the type of the control.