![]() | ![]() |
Home |
|
|
Pocket PowerBuilder Resource Guide and Reference |
|
| Chapter 24: Property Reference |
Chapter 24
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.
NotificationBubble objects
Defines the main text for the notification bubble. Text must be in HTML format.
Enter the text you want in the Body text box on the General page of the NotificationBubble object's Properties view.
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_bodyli_return = myBubble.update()
NotificationBubble objects
Defines text for the notification bubble caption (title).
Enter the text you want in the Caption text box on the General page of the NotificationBubble object's Properties view.
The Caption property takes a string. The following example sets the caption text for a notification bubble:
nb_myBubble.Caption = "Message in a bubble"
Windows
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.
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.
This property cannot be set in a script.
Windows
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.
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.
This property cannot be set in a script.
NotificationBubble objects
Defines the length of time in seconds that the notification bubble displays.
Enter the duration you want in the Duration text box on the General page of the NotificationBubble object's Properties view.
The Duration property takes an integer. The following example sets the duration for a notification bubble to 5 seconds:
nb_myBubble.Duration = 5
NotificationBubble objects
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.
Enter the number you want in the Flags text box on the General page of the control's Properties view.
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.
NotificationBubble objects
Determines whether a notification bubble displays initially as an icon, or whether the bubble itself displays when the notification event is triggered. Values are:
TRUE - Displays initially as an icon
FALSE - Displays initially as a notification bubble
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.
Click the Initially Iconic check box on the General page of the NotificationBubble object's Properties view.
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
ToolbarItem objects
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.
Select the toolbar item on the Items page of the Properties view for a Toolbar control.
Select or clear the Enabled check box.
Selecting the Enabled check box sets the ItemState value to 4.
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
ToolbarItem objects
Determines the style of a toolbar item. Values are:
StyleButton!
Specifies a standard toolbar button that automatically returns to the up position after a user taps it.
StyleCheck!
Specifies a toolbar button that remains depressed when a user taps it. The user must tap the button a second time to raise it.
StyleCheckGroup!
Specifies a toolbar button that is grouped with other buttons having this same style. A button of this style remains depressed after a user taps it, but returns to the up position when the user taps it again or taps another toolbar button of the same style.
StyleSeparator!
Specifies a separator bar.
Select the toolbar item on the Items page of the Properties view for a Toolbar control.
Select the style for the toolbar item in the Style drop-down list.
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!
Windows
The MenuBar property makes room at the bottom of the current window to allow a menu to be inserted.
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.
This property cannot be set in a script.
NotificationBubble objects
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.
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.
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.
POOM objects
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.
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 ifSignature controls
Specifies the style of the control, which can be one of the following:
SigPageStyleNone! (Default style)
SigPageStyleDottedLines!
SigPageStyleGridLines!
SigPageStyleLeftMargin!
SigPageStyleRuledLines!
SigPageStyleTopMargin!
SigPageStyleTopLeft Margin!
SigPageStyleYellowBackground!
Select the value you want from the Page Style drop-down list on the General page of the control's Properties view.
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!
Signature controls
Specifies the drawing mode. Values are:
SIGPenModePen! - User can write or draw (default)
SIGPenModeSelect! - User can select text
SIGPenModeSpace! - User can collapse and expand white space
Select the value you want from the Pen Mode drop-down list on the General page of the control's Properties view.
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!
Toolbar controls
Determines where on the window the toolbar is located. Values are:
AlignAtBottom!
Docks toolbar at bottom of window or user object
AlignAtTop!
Docks toolbar at top of window or user object
Floating!
Allows you to position the toolbar using x and y coordinates
Enter an enumerated value in the Position list box on the General page of the control's Properties view.
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!
BarcodeScanner objects
Specifies the data from the most recent scan after a RetrieveData call.
The ScannedData property is a read-only string.
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
BarcodeScanner objects
Specifies the bar code symbology type from the most recent scan after a RetrieveData call.
The ScannedSymbology property is a read-only integer specifying the decoder ID.
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)
BarcodeScanner objects
Specifies the time of the most recent scan after a RetrieveData call.
The ScannedTimeStamp property is a datetime datatype.
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)
BiometricScanner objects
Specifies the bitset of authentication techniques used by the biometric scanner, including voice, fingerprint, and iris recognition.
The ScannerType property takes a string. For the HPBiometricScanner object, it defaults to the only supported value (fingerprint).
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)
Windows
The ShowSIPButton property specifies whether or not the soft input panel (SIP) button is displayed in a window.
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.
This property cannot be set in a script.
EditMask, MultilineEdit, and SingleLineEdit controls
Determines whether the SIP displays when a user changes focus to an editable control. Values are:
TRUE - SIP displays when user changes focus to the control
FALSE - (Default) SIP does not automatically display
This property has no effect on an application running on the desktop.
Select the Show SIP On Focus check box on the General page of the control's Properties view.
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
Windows
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.
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.
This property cannot be set in a script.
Windows and all draggable controls. This property does not apply to menu or drawing objects.
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.
To disable the property, clear the Tap and Hold Indicator check box on the Other property page of the window or control.
In a scriptThe 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
Application object
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).
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.
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"
Application object
Specifies the text for a custom Pocket PowerBuilder Today item.
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.
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)
Application object
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.
Type a number from 0 to 11 in the Order text box on the Today Item page of the Application object's Properties view.
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
Application object
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.
Type the name of the application in the Run App text box on the Today Item page of the Application object's Properties view.
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"
Toolbar controls
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.
To make the toolbar background transparent, select the Transparent check box on the General property page of the Toobar control.
In a scriptThe 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
POOM objects
This is a read-only property that indicates the version of Microsoft Pocket Outlook.
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
Signature controls
Specifies the type of user input expected. Values are:
SIGViewStyleWriting! - Words in user input are converted to text
SIGViewStyleTyping! - User inputs data using the SIP
SIGViewStyleDrawing! - No attempt is made to convert user input into text
Select the value you want from the View Style drop-down list on the General page of the control's Properties view.
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!
Toolbar controls
Determines whether the toolbar items wrap onto a second line. Values are:
TRUE - (Default) Toobar items wrap
FALSE - Toolbar items do not wrap
Select or clear the Label Wrap check box on the General page of the control's Properties view.
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
Signature controls
Specifies whether text is wrapped to a window or page. Values are:
SigWrapModePage! - Wraps text to page
SigWrapModeWindow! - Wraps text to window (default)
Select the value you want from the Wrap Mode drop-down list on the General page of the control's Properties view.
The WrapMode property takes an enumerated datatype. The following example specifies that text in the control wraps to the page:
sig_1.WrapMode = SigWrapModePage!
Signature controls
Specifies the zoom percent for the control. The default zoom percent is 100.
Set the value you want in the ZoomPercent spin control on the General page of the control's Properties view.
The ZoomPercent property takes an integer. The following example sets the zoom to 75 percent:
sig_mine.ZoomPercent = 75
|
|