Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Chapter 23: Native Objects and Controls [Table of Contents] Chapter 25: Event Reference

Pocket PowerBuilder Resource Guide and Reference

[-] Chapter 24: Property Reference

Chapter 24

Property Reference

About this chapter

This chapter describes properties that are used in Pocket PowerBuilder but not in PowerBuilder.

You can find descriptions of all the properties, functions, events, and objects that are used in Pocket PowerBuilder and PowerBuilder in the online Help.

Body

Applies to

NotificationBubble objects

Description

Defines the main text for the notification bubble. Text must be in HTML format.

Usage

In a painterTo add text for the body of a notification bubble:
  1. Enter the text you want in the Body text box on the General page of the NotificationBubble object's Properties view.

In scripts

The Body property takes a string in HTML format. The following example sets the text for a notification bubble:

STRING ls_body
NotificationBubble myBubble 
Integer li_return
ls_body = "<html><body><form method=~"POST~" action=>"& +"<p>This is <font color=~"#0000FF~"><b>HTML</b>" &
+"</font>notification coming from "
ls_body += "<font color=~"#FF0000~"><i>Pocket</i>"&   +"PowerBuilder</font></p><p align=right><input "&   +"type=button name='cmd:10' value='My Ok'> "&
  +"<input type=button name='cmd:2' value='Cancel'>"&
  +"</p></body></html>"

myBubble = CREATE NotificationBubble
myBubble.caption = "My Title"
li_return = myBubble.icon ("bubble.ico")
myBubble.body = ls_body
li_return = myBubble.update()

Caption

Applies to

NotificationBubble objects

Description

Defines text for the notification bubble caption (title).

Usage

In a painterTo add text for a notification bubble caption:
  1. Enter the text you want in the Caption text box on the General page of the NotificationBubble object's Properties view.

In scripts

The Caption property takes a string. The following example sets the caption text for a notification bubble:

nb_myBubble.Caption = "Message in a bubble"

Close

Applies to

Windows

Description

The Close property adds an OK icon to the title bar of a window that you deploy to a Windows CE platform. When users click OK, user input is confirmed, the window object is destroyed, and the Pocket PowerBuilder application is closed.

Usage

In a painterTo display an OK icon to a window:
  1. Select the Close check box on the General page of the window's Properties view.

    Selecting the Close check box clears the Smart Minimize check box.

In scripts

This property cannot be set in a script.

DefaultSize property

Applies to

Windows

Description

The DefaultSize property changes the size of the current window to the default size specified on the Size page of the Design Options dialog box in the Window painter.

Usage

In a painterTo change the size of the current window to the default:
  1. Select the DefaultSize check box on the General page of the window's Properties view.

    You specify the default size for all main windows on the Size page of the Design Options dialog box. You can select the defaults for Portrait or Landscape orientation or specify a custom width and height.

    All new windows are created as main windows with the width and height you specify in the Design Options dialog box, and with the DefaultSize check box selected. If you change the window type to Response, the DefaultSize check box is cleared and the size of the window changes to a size suitable for response windows.

    If you change the size of a window on the Other property page, the DefaultSize check box is not cleared. To return to the default size, clear the check box and then reselect it.

In scripts

This property cannot be set in a script.

Duration

Applies to

NotificationBubble objects

Description

Defines the length of time in seconds that the notification bubble displays.

Usage

In a painterTo select a duration for the display of a notification bubble:
  1. Enter the duration you want in the Duration text box on the General page of the NotificationBubble object's Properties view.

In scripts

The Duration property takes an integer. The following example sets the duration for a notification bubble to 5 seconds:

nb_myBubble.Duration = 5

Flags

Applies to

NotificationBubble objects

Description

Sets behavior changes for the notification bubble. Values are:

Value

Windows CE value

Description

0

--

(Default) No changes

1

Straight to tray

Hides initial display of the notification bubble, displaying it only as an icon

2

Critical

Highlights notification bubble borders and title

16

Display on

Forces the display to turn on for the notification (Pocket PC 2003 only)

32

Silent

Forces the notification to be silent and not vibrate regardless of system settings (Pocket PC 2003 only)

The value you set for the Flags property is additive. A value of 1, 3, 17, 19, 33, 35, 49, or 51 overrides the InitiallyIconic property, because the Flags value of 1 is set, meaning that the notification bubble will not display initially when a notification update occurs. A value of 16 or greater is valid only for Pocket PC 2003 operating systems.

Usage

In a painterTo set flags for a notification bubble:
  1. Enter the number you want in the Flags text box on the General page of the control's Properties view.

In scripts

The Flags property takes a long. The following example sets the Flags property for a notification bubble to 3:

nb_myBubble.Flags = 3

In this example, the notification bubble is not displayed initially and when it is displayed, the bubble borders and title are highlighted to indicate a critical message.

InitiallyIconic

Applies to

NotificationBubble objects

Description

Determines whether a notification bubble displays initially as an icon, or whether the bubble itself displays when the notification event is triggered. Values are:

In all cases, users can click the notification icon to display the bubble. The value set for this property can be overridden by a Flags property setting.

Usage

In a painterTo select the notification bubble for initial display as an icon:
  1. Click the Initially Iconic check box on the General page of the NotificationBubble object's Properties view.

In scripts

The InitiallyIconic property takes a boolean. The following example hides the notification bubble when a notification is sent and sets the initial display to an icon only:

nb_myBubble.InitiallyIconic = true

ItemState

Applies to

ToolbarItem objects

Description

Determines the state of a toolbar item. Values are:

Value

Description

1

Specifies a StyleCheck! or StyleCheckGroup! toolbar button in the depressed state

2

Specifies a StyleButton! toolbar button in a transitional depressed state

4

Enables a toolbar button for selection

32

Specifies that the next item in the toolbar will wrap to a separate line if it is not part of the same toolbar item group

Values are additive. For example, suppose you want to set a toolbar button with the checked state (1) and enable it (4), with the next set of buttons wrapped to a different line (32). You would enter 37 for the value of the ItemState property.

Usage

In a painterTo select a style for a toolbar item:
  1. Select the toolbar item on the Items page of the Properties view for a Toolbar control.

  2. Select or clear the Enabled check box.

    Selecting the Enabled check box sets the ItemState value to 4.

In scripts

The ItemState property has an integer datatype. The following example enables the toolbar button and sets the toolbar item with a checked state:

tbi_myToolbarItem.ItemState = 5

ItemStyle

Applies to

ToolbarItem objects

Description

Determines the style of a toolbar item. Values are:

Usage

In a painterTo select a style for a toolbar item:
  1. Select the toolbar item on the Items page of the Properties view for a Toolbar control.

  2. Select the style for the toolbar item in the Style drop-down list.

In scripts

The Style property takes an enumerated value of the type ToolbarItemStyle. The following example changes a toolbar item style, adding it to a group of buttons. The button remains depressed after a user taps it, but returns to the up position when the user taps the button again or taps another button of the same style:

tbi_myToolbarItem.Style = StyleCheckGroup!

MenuBar

Applies to

Windows

Description

The MenuBar property makes room at the bottom of the current window to allow a menu to be inserted.

Usage

In a painterTo make room for a menu at the bottom of a window:
  1. Select the MenuBar check box on the General page of the window's Properties view.

    When you set a value for the MenuName property of a window, the MenuBar property is automatically selected and disabled.

In scripts

This property cannot be set in a script.

NotificationID

Applies to

NotificationBubble objects

Description

Defines a unique ID for a notification bubble. If you do not set the NotificationID property for a NotificationBubble object, the Pocket PowerBuilder runtime generates a unique notification ID. This ensures that the value for the notification ID is unique. When you set this property yourself, you run the risk of assigning an ID that is already used by the system.

Usage

In a painterTo add an ID for a notification bubble:
  1. Enter the number you want in the Notification ID text box on the General page of the NotificationBubble object's Properties view.

    The default value is 0. If you do not change the default value, the Pocket PowerBuilder runtime generates a unique notification ID.

In scripts

The NotificationID property takes an unsignedlong. The following example sets the ID for a notification bubble to 555:

nb_myBubble.NotificationID = 555

The following example captures the NotificationID of a NotificationBubble object and assigns it to a local variable.

unsignedlong ll_ID
ll_ID = nb_myBubble.NotificationID

You can also save the ID for later use by assigning it to a global variable.

OutlookCompatible

Applies to

POOM objects

Description

This is a read-only property that indicates whether the version of Microsoft Pocket Outlook on the Pocket PC is compatible with Outlook on the desktop.

Usage

In scripts

The OutlookCompatible property is a boolean datatype. The following example determines whether a POOM object is compatible with Microsoft Outlook:

boolean bool_compatible
bool_compatible = po_1.OutlookCompatible
if bool_compatible = false
   MessageBox("Incompatible", "This Pocket Outlook " &
     + "is not compatible with the desktop Outlook")
end if

PageStyle

Applies to

Signature controls

Description

Specifies the style of the control, which can be one of the following:

Usage

In a painterTo select a page style for the control:
  1. Select the value you want from the Page Style drop-down list on the General page of the control's Properties view.

In scripts

The PageStyle property takes an enumerated datatype. The following example sets the page style for the control to a yellow background:

sig_mine.PageStyle = SIGPageStyleRuledLines!

PenMode

Applies to

Signature controls

Description

Specifies the drawing mode. Values are:

Usage

In a painterTo select a pen mode for the control:
  1. Select the value you want from the Pen Mode drop-down list on the General page of the control's Properties view.

In scripts

The PenMode property takes an enumerated datatype. The following example sets the pen mode for the control to enable text selection:

sig_mine.PenMode = SigPenModeSelect!

Position

Applies to

Toolbar controls

Description

Determines where on the window the toolbar is located. Values are:

Usage

In a painterTo select an alignment for a toolbar:
  1. Enter an enumerated value in the Position list box on the General page of the control's Properties view.

In scripts

The Position property takes an enumerated value of type ToolbarAlignment. The following example displays the toolbar at the top of a parent window:

tlbr_myToolbar.Position = AlignAtTop!

ScannedData

Applies to

BarcodeScanner objects

Description

Specifies the data from the most recent scan after a RetrieveData call.

Usage

The ScannedData property is a read-only string.

Examples

Example 1

The following example retrieves data from a single scan:

Integer l_iret
l_iret = l_scanner.Open()
l_iret = l_scanner.ScanWait( 30 )
l_iret = l_scanner.RetrieveData()
sl_data.text = l_scanner.ScannedData

ScannedSymbology

Applies to

BarcodeScanner objects

Description

Specifies the bar code symbology type from the most recent scan after a RetrieveData call.

Usage

The ScannedSymbology property is a read-only integer specifying the decoder ID.

Examples

Example 1

The following example retrieves the type of bar code from a bar code scan:

Integer l_iret, l_id
l_iret = l_scanner.Open()
l_iret = l_scanner.ScanWait( 30 )
l_iret = l_scanner.RetrieveData()
l_id = l_scanner.ScannedSymbology
sl_symbology.text = l_scanner.DecoderName(l_id)

ScannedTimeStamp

Applies to

BarcodeScanner objects

Description

Specifies the time of the most recent scan after a RetrieveData call.

Usage

The ScannedTimeStamp property is a datetime datatype.

Examples

Example 1

The following example retrieves the timestamp from a single bar code scan:

Integer l_iret
l_iret = l_scanner.Open()
l_iret = l_scanner.ScanWait( 30 )
l_iret = l_scanner.RetrieveData()
sl_data.text = l_scanner.ScannedData
sl_time.text = String (l_scanner.ScannedTimeStamp)

ScannerType

Applies to

BiometricScanner objects

Description

Specifies the bitset of authentication techniques used by the biometric scanner, including voice, fingerprint, and iris recognition.

Usage

The ScannerType property takes a string. For the HPBiometricScanner object, it defaults to the only supported value (fingerprint).

Examples

Example 1

The following example retrieves the authentication type from the current scanner:

Integer l_iret
l_iret = l_scanner.Open()
sl_type.text = string (l_scanner.ScannerType)

ShowSIPButton

Applies to

Windows

Description

The ShowSIPButton property specifies whether or not the soft input panel (SIP) button is displayed in a window.

Usage

In a painterTo display the SIP button in a window:
  1. Select the Show SIP Button check box on the General page of the window's Properties view.

    If the MenuBar property is also set, the SIP button displays in the menu bar region. If you turn off the MenuBar property, the SIP button displays in the window, and you should make sure that you do not place any controls in the region in which it displays.

In scripts

This property cannot be set in a script.

SIPOnFocus

Applies to

EditMask, MultilineEdit, and SingleLineEdit controls

Description

Determines whether the SIP displays when a user changes focus to an editable control. Values are:

This property has no effect on an application running on the desktop.

Usage

In a painterTo select the SIP for automatic display:
  1. Select the Show SIP On Focus check box on the General page of the control's Properties view.

In scripts

The SIPOnFocus property takes a boolean. The following example displays the SIP automatically when focus is changed to the sle_addText text control:

sle_addText.SIPOnFocus = true

SmartMinimize

Applies to

Windows

Description

The SmartMinimize property adds an X icon to the title bar of a window that you deploy to a Windows CE platform. When users click the X, the application is removed from the current navigational stack, but remains in memory for quicker availability and enhanced performance.

Usage

In a painterTo display an X icon to a window:
  1. Select the Smart Minimize check box on the General page of the window's Properties view.

    Selecting the Smart Minimize check box clears the Close check box.

In scripts

This property cannot be set in a script.

Tap_And_Hold_Indicator

Applies to

Windows and all draggable controls. This property does not apply to menu or drawing objects.

Description

When the Tap_And_Hold_Indicator property is enabled, red or blue dots in a circular animation display to confirm that the user has performed a tap and hold action with the stylus on the control. This action on a Pocket PC simulates a right mouse-click. The property is enabled by default to conform with typical Pocket PC behavior.

Usage

In a painter

To disable the property, clear the Tap and Hold Indicator check box on the Other property page of the window or control.

In a script

The Tap_And_Hold_Indicator property takes a boolean value. The following example sets the Tap_And_Hold_Indicator property of a ListView item to false, which prevents the animation from displaying when the user holds the stylus on the item:

lvitem_1.Tap_And_Hold_Indicator = false

TodayDisplayApp

Applies to

Application object

Description

Specifies an application to control the display of a custom Pocket PowerBuilder Today item. You must use the full device path to the display application.

Typically, you would use the application where you set the custom Today item as the item's display application, but this is not required. The display application should not have a visual user interface. However, it can be used to define updated text and formatting for the custom Today item.

A display application is especially useful if you want to change the custom item display based on the time elapsed, or on a counter for events, such as the number of updates to a database. Adding a display application adds to the memory burden of a device, since the Pocket PowerBuilder VM remains loaded in memory at all times (or until the custom Today item is disabled or removed).

Usage

In a painterTo select a display application for a Today item:
  1. Type the name of the display application in the Display App text box on the Today Item page of the Application object's Properties view.

In scripts

The TodayDisplayApp property takes a string. The following example sets the display application for the custom Today item associated with the SyncDisplay application:

SyncDisplay.TodayDisplayApp="\Program Files\timer.exe"

TodayDisplayText

Applies to

Application object

Description

Specifies the text for a custom Pocket PowerBuilder Today item.

Usage

In a painterTo select a display text for a Today item:
  1. Type the name of the display text in the Display Text text box on the Today Item page of the Application object's Properties view.

In scripts

The TodayDisplayText property takes a string. The following example sets the display text for the custom Today item associated with the SyncDisplay application:

SyncDisplay.TodayDisplayText = "Sync Update Count is " &
 + string(counter)

TodayOrder

Applies to

Application object

Description

Specifies the position in the Today screen of a custom Pocket PowerBuilder Today item.

Typically the top item in the Today screen is the date, followed by owner information, calendar appointments, the mail inbox, and tasks. The date does not have an order number in the device registry, so if it is displayed, it is always at the top of the Today screen. Otherwise, the first item in the Today screen has the order number 0 and the Today screen can accommodate a maximum of 12 items.

When you deploy a custom item with a TodayOrder value of 0, the previous item in the Today screen with a value of 0 is moved to the bottom of the Today screen.

Usage

In a painterTo select a position for a custom Today item:
  1. Type a number from 0 to 11 in the Order text box on the Today Item page of the Application object's Properties view.

In scripts

The TodayOrder property takes an integer. The following example sets the custom Today item associated with the SyncDisplay application as the sixth item in the Today screen:

SyncDisplay.TodayOrder = 5

TodayRunApp

Applies to

Application object

Description

Specifies the application that is launched when the user taps the custom Pocket PowerBuilder Today item. You must use the full device path to the run application.

If you select a run application, the icon assigned to the run application is displayed next to the custom Today item on the device.

Usage

In a painterTo select an application to launch when the user taps the custom Today item:
  1. Type the name of the application in the Run App text box on the Today Item page of the Application object's Properties view.

In scripts

The TodayRunApp property takes a string. The following example sets the application to launch when a user taps the custom Today item associated with the SyncDisplay application:

SyncDisplay.TodayRunApp = "\Program Files\sync_run.exe"

Transparent

Applies to

Toolbar controls

Description

Setting the Transparent property to true makes the toolbar control background invisible at design time and at runtime. This does not affect the display of toolbar items. The Transparent property is set to false by default.

Usage

In a painter

To make the toolbar background transparent, select the Transparent check box on the General property page of the Toobar control.

In a script

The Transparent property takes a boolean value. The following example makes the tlbr_1 Toolbar control transparent. The buttons on the toolbar remain visible:

tlbr_1.Transparent = true

Version

Applies to

POOM objects

Description

This is a read-only property that indicates the version of Microsoft Pocket Outlook.

Usage

In scripts

The Version property is a string. The following example gets the version for a POOM object and writes it to a single line edit box:

sle_1.text = po_1.version

ViewStyle

Applies to

Signature controls

Description

Specifies the type of user input expected. Values are:

Usage

In a painterTo select a view style for the control:
  1. Select the value you want from the View Style drop-down list on the General page of the control's Properties view.

In scripts

The ViewStyle property takes an enumerated datatype. The following example sets the view style for the control to allow drawing only:

sig_mine.ViewStyle = SigViewStyleDrawing!

Wrap

Applies to

Toolbar controls

Description

Determines whether the toolbar items wrap onto a second line. Values are:

Usage

In a painterTo select an alignment for a toolbar:
  1. Select or clear the Label Wrap check box on the General page of the control's Properties view.

In scripts

The Wrap property takes a boolean. The following example wraps the items in a toolbar onto a second line if necessary:

tlbr_myToolbar.Wrap = true

WrapMode

Applies to

Signature controls

Description

Specifies whether text is wrapped to a window or page. Values are:

Usage

In a painterTo select a wrap mode for the control text:
  1. Select the value you want from the Wrap Mode drop-down list on the General page of the control's Properties view.

In scripts

The WrapMode property takes an enumerated datatype. The following example specifies that text in the control wraps to the page:

sig_1.WrapMode = SigWrapModePage!

ZoomPercent

Applies to

Signature controls

Description

Specifies the zoom percent for the control. The default zoom percent is 100.

Usage

In a painterTo select a zoom percent for the control:
  1. Set the value you want in the ZoomPercent spin control on the General page of the control's Properties view.

In scripts

The ZoomPercent property takes an integer. The following example sets the zoom to 75 percent:

sig_mine.ZoomPercent = 75


Chapter 23: Native Objects and Controls [Table of Contents] Chapter 25: Event Reference