Home > Language Reference > Classes > UIComponent

UIRef Property

Internal reference to a control.

Syntax

Public Property Get UIRef() As Long

Remarks

The UIRef property returns a reference to a control useable with the native Palm OS® functions. Most functions related to controls are already encapsulated by HB++ - but to ensure a maximum opportunity to use the language, this property allows calls to native Palm OS® functions or passes this reference to shared libraries.

For further information on shared libraries and communication between HB++ and the C language, refer to the Shared library chapter in the Programmer's Guide and the description of the Declare statement.

In the following example, we declare a Palm OS® function that carries out an 'Undo' on a field. This line should be copied in a module:

Public declare  Sub FldUndo (ByVal FieldType As Long) trap &HA15F

This procedure goes on the main form, which must contain a Field control:

Private Sub Button1_Click()
  FldUndo Field1.UIRef
End Sub

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A