Manual Power Builder Net
Manual Power Builder Net
Contents
What is PowerBuilder .NET
............................................................1
................................................................................3
..................................................................7
..........................................33
.....................................................43
iii
Contents
...................................................49
........................................................63
DataWindows
............................................................................71
iv
Contents
....................................87
.........................................................91
Contents
vi
The WPF painter also generates PowerScript code to work as the code behind file to the XAML files. However, before
it can be used as a code behind file, it is translated and processed by the pb2cs compiler. The generated files are then
compiled to a WPF application that contains embedded BAML. The WPF application also references the PowerBuilder
WPF runtime engine that enables users to run the deployed application.
The PowerBuilder .NET controls use a "PB" prefix internally. This set of controls enables you to use PowerScript code
to access control properties, methods, and events. They marshal the data and pass it to the PowerBuilder version of WPF
controls in the presentation layer.
The controls that you add to window objects in the PowerBuilder WPF painter, and that display in the runtime presentation
layer, are derived from control classes in the WPF Framework (System.Windows.Controls namespace). They are
referenced at design time in XAML using the default pbwpf alias for the Sybase.PowerBuilder.WPF.Controls
namespace, and at runtime, in binary application markup language (BAML).
Semantic Differences
Semantic differences between PowerBuilder and Visual Studio can lead to confusion.
System.dll (v 2.0)
PresentationCore.dll (v 3.0)
PresentationFramework.dll (v 3.0)
WindowsBase.dll (v 3.0)
System.Xml.Linq.dll (v 3.5)
Sybase.PowerBuilder.WPF.dll
Sybase.PowerBuilder.Common.dll
Sybase.PowerBuilder.Interop.dll
Sybase.PowerBuilder.Core.dl
Hardware acceleration
WPF is built on top of Direct3D, which offloads work to graphics processing units (GPUs) instead of central processor
units (CPUs). This provides WPF applications with the benefit of hardware acceleration, permitting smoother
graphics and enhanced performance.
Declarative programming
WPF uses Extensible Application Markup Language (XAML) declarative programming to define the layout of
application objects and to represent 3D models, among other things. This allows graphic designers to directly
contribute to the look and feel of WPF applications.
Rich composition and customization
WPF controls are easily customizable. You do not have to write lines of code, or for that matter, any code, to customize
controls in very unique ways. WPF also makes it easy to create skins for applications that have radically different
looks.
Easy deployment
WPF provides options for deploying traditional Windows applications (using Windows Installer or ClickOnce) or for
hosting applications in a Web browser. Although this feature is not unique to WPF, it is still an important component
of the technology.
WPF is also more suitable for applications with rich media content than Windows Forms applications. This includes
applications using:
Other differences in functionality relate to the WYSIWYG designer in PowerBuilder .NET and the sequence in which
events are handled.
Event sequence
The difference in event sequence in WPF applications should not affect new applications. However, applications that
you migrate from PowerBuilder Classic require manual refactoring when they rely on the order of triggered events.
Although Web Forms applications also use a different event sequence than Windows 32 or Windows Forms
applications, in Web Forms applications, the events can be saved to a queue and executed during a postback operation.
For WPF applications, the events must be handled immediately after they are fired
Comment
XAML editor
The eXtensible Application Markup Language (XAML) allows you to code the presentation aspects of your applications separate from the business logic that you code in the
PowerBuilder .NET painter Script views. Changes that you make in the painter designer
views are reflected in the XAML editor code, and changes you make in the XAML editor
can be seen in the designer views. You can only view the XAML editor for a painter when
the Layout view is also visible.
Object Browser
The Object Browser allows you to view all .NET Framework classes. It is accessible from
the View menu and is separate from the classic PowerBuilder Object Browser that is also
available from the View menu.
Source control
Source control functionality is available from the File>Source Control menu of PowerBuilder .NET. PBG files are no longer required, because exported objects are not compiled into a binary PBL file as in PowerBuilder Classic. The Visual Studio shell source
control functionality also does not use PBC files.
The Code Snippets Manager replaces the PowerBuilder Classic Clip window, and allows
you to add XML snippets as well as PowerScript snippets. You can insert snippets from
the pop-up menu in painter Script views. The Code Snippet Manager is available from the
Tools menu.
Command window
You open the Command window from the View>Other Windows menu. It allows you to
execute commands from the design time environment. Intellisense is active in the Command window to assist you in scripting valid commands for your targets.
Document outline
The Document Outline view enables you to see a list of controls available in the current
painter. It replaces the Control List and Non-Visual Object List in PowerBuilder Classic,
but it also shows the control hierarchy. You can open the Document Outline view from the
View>Other Windows cascading menu.
Toolbox
Replaces the tool selection facility in the painter toolbars and Insert menu in PowerBuilder Classic. You open the toolbox from the PowerBuilder .NET View menu. You can
add or remove toolbox items from the Tools>Choose Toolbox Items menu.
Intellisense
Replaces PowerBuilder Classic autoscript, but also provides selections for classes, methods, and members of all assemblies included in target references. Intellisense is available
in painter Script views, in the XAML editor, from the Edit menu, and in the Command
window.
Properties window
The Properties window replaces the Properties view in PowerBuilder Classic painters. It
allows you to sort properties by category or alphabetically, and when opened from the
View>Properties Window menu, has a status line to describe a selected property.
Configuration
You open the Configruration Manager from the Properties pages dialog box for each
PowerBuilder .NET workspace/solution. Release and Debug configurations are provided
by default, although you can add and edit configurations from the Configuration Manager.
You can change the deployment platform for a particular configuration, and you can open
the Edit Project Configurations dialog box from the Configuration Manager to rename or
remove a configuration that you added.
Comment
Bookmark window
You can enable and toggle bookmarks in painter Script views or in the XAML editor from
the Edit>Bookmarks cascading menu. You open the Bookmark window from the
View>Other Windows cascading menu.
The PowerBuilder .NET Find and Replace dialog box has tabs for Quick Find and Quick
Replace. It is available from the Edit>Find and Replace menu, and it allows you to
bookmark all items that match the Find string.
Layout view
The painter Layout views use the Visual Studio designer and are closely associated with
the XAML editor. A magnifier bar in the upper left corner of each Layout view allows you
to change the magnification of objects and controls at design time without changing their
size at runtime. The close (x) icon at top right corner closes only the current tab of the
painter. If you click this icon while the Layout view is current, the Layout tab closes and
the Script (code-behind) view becomes current.
File editor
The Open With dialog box replaces the File Editor in PowerBuilder Classic. It allows you
to select an editor for text in the Script views or XAML editor, or for current items in the
System Tree. It also allows you to add editors that you want to use to view these files, and
set a different editor as the default file viewing selection. You can open this dialog box
from the View>Open With menu item.
Text formatting
In PowerBuilder .NET, you can format text in painter Script views, in the XAML editor,
and in the Command window with the Edit>Advanced cascading menu items.
Task list
Replaces the PowerBuilder Classic To-Do List. You can open the Task list by selecting the
View>Other Windows>Task List menu item.
However, there is also System Tree functionality that is no longer available with the file orientation of the
PowerBuilder .NET System Tree. This includes:
Some functionality operates similarly in the PowerBuilder Classic System Tree and in the PowerBuilder .NET System
Tree. Double-clicking an item in the System Tree executes the default action for that item. Right-clicking an item opens
the pop-up menu for that item.
The following pop-up menu items on a PowerBuilder Classic System Tree object are not available in the System Tree in
PowerBuilder .NET:
PBNI Extensions
PowerBuilder .NET library nodes do not have the Import PowerBuilder Extension pop-up menu item for importing
PBNI extensions.
Optimize
In PowerBuilder Classic, the Optimize menu item provides a way to clean up deleted objects and items that have been
accumulated in target PBLs. This is not necessary in PowerBuilder .NET.
Migrate
The PowerBuilder Classic migrate capability assumes you can view a target in the System Tree that does not list
objects in an expanded PBL format. In PowerBuilder .NET, objects are always listed in an expanded format, so the
Migrate pop-up menu item is not necessary.
The other use of the Migrate pop-up menu is to regenerate PCode from the sources for an object, and this is also not
needed in PowerBuilder .NET.
Separate Library List and .NET Assemblies
Separate pop-up menu items for the library list and .NET assemblies are not needed inPowerBuilder .NETbecause of
their functional equivalence. Instead, a single pop-up menu item, "Library List", lists all PBLs and .NET assemblies
in PowerBuilder .NET targets.
Regenerate
Like the Optimize and Migrate pop-up menu items, the Regenerate menu item is not needed in the PowerBuilder .NET
System Tree because objects are always listed in an expanded format.
Button
CheckBox
CheckBox
DataWindow
ComboBox
EditMask
Graph
GroupBox
GroupBox
ProgressBar
ScrollBar
Slider
InkPicture
InkCanvas
ListBox
ListView
ListView
Menu
Menu/Toolbar
MenuCascade
Menu
TextBox
Image
RadioButton
RadioButton
RichTextEdit
RichTextBox
StaticHyperLink
HyperLink
StaticText
Label
Tab
TabControl
TreeView
TreeView
Window
Window/Grid
The following visual controls have no current WPF control equivalents: Animation, DateTimePicker, DragObject,
InkEdit, and MonthCalendar.
General
Initially, the General tab is empty, but you can add items that you want to store for later reuse, including
these kinds:
The list of controls depends on the object that has focus. For example, when a Window painter is active,
the controls that can be added to that painter become available in the Toolbar. If you change focus to a
different object, the items available in the Toolbar might change.
Controls
.NET Framework components
Your own or third-party components
Reusable text or code snippets
For example, you can highlight some code in a script window and drag it to the General tab to create a
reusable item. Or, you can copy an EventLog component and paste it in the toolbox. These items are
ready to be dragged from the General tab and dropped into the code editor or onto the active design
surface.
See the Toolbox topics in Visual Studio Help for details about basic Toolbox usage and customization.
10
Pointer
CommandButton
PictureButton
CheckBox
RadioButton
StaticText
StaticHyperlink
Picture
PictureHyperLink
GroupBox
Line
Oval
Rectangle
RoundRectangle
SingleLineEdit
EditMask
MultiLineEdit
RichTextEdit
HScrollBar
VScrollBar
HTrackBar
VTrackBar
HProgressBar
VProgressBar
DropDownListBox
DropDownPictureListBox
ListBox
PictureListBox
ListView
Treeview
Tab
DataWindow
Graph
MonthCalendar
DatePicker
Animation
InkEdit
InkPicture
OLE
UserObject
PowerBuilder Objects
The Toolbar PowerBuilder Objects tab contains the following non-visual items:
Name
AdoResultSet
Connection
11
DataStore
DynamicDescriptionArea
DynamicStagingArea
Error
InternetResult
JaguarORB
MailSession
Message
MlSync
OleObject
OleStorage
OleStream
OleTxnObject
Pipeline
Profiling
SslCallback
Timing
TraceFile
TraceTree
Transaction
UlSync
UserObject
PB Object Outline
The PB Object Outline provides a convenient, single view for navigating and manipulating all the elements of a selected
object.
The view is available whenever a PowerBuilder object is open in the Designer.
To open the PB Object Outline, select an object in a PowerBuilder design window, then click View > OtherWindows
> PB Object Outline .
The PB Object Outline shows the elements of the currently selected object, which can be organized into groups such as
events, controls, and functions.
If you select a different object, an open PB Object Outline changes to show the new object's elements. If no PowerBuild
object is selected, the window is empty except for a message that an outline is not available for the active object.
If the object represented in the outline is under source control, it has a source control icon just as in the System Tree.
Element Icons
Each element in the PB Outline Tool has a static icon. For example, there are control, structure, and event icons. Some
elements, such as events, functions, .NET properties, and indexers, have an additional state icon.
.NET properties and indexer state icons have the same meaning as state icons in Event and Function lists. They reflect the
state of both get and set combined, because an element can represent both methods.
Navigating the Outline
You can navigate the PB Outline by expanding and collapsing groups of elements. Individual elements expand to show
any attributes and subcomponents. For example, you can expand a control to list its events. Non-visual objects expand to
events and functions, and custom user objects can expand to controls.
12
When enabled, includes ancestors for events, functions, indexers, and NET properties. When
disabled (the default) only locally scripted events or functions will be displayed for any of the
order schemes below.
Show Unscripted
WPF Events and
Functions
When enabled, includes events and functions for which no script has been created. When disabled
(default), only scripted events and functions are shown.
Problem Scripts
Rise to Top
When enabled (default), lists elements first whose scripts contain errors or warnings. When you
correct the propblem, the element reverts to its appropriate position in the list.
Choose one of the following order schemes:
Alphabetically
Scripted Local First
Lists local scripts first, followed by the remaining elements in alphabetical order.
Scripted Local, Scripted Ancestor, Unscripted (default)
Lists local scripts first, followed by ancestor scripts, and finally unscripted events or functions.
Scripted Anywhere, Unscripted
You can control these settings either globally or for the current PB Object Outline:
Set the options globally in the PowerBuilder Options page. The global settings apply to the System Tree, PB Object
Outline, and the Event and Function List views.
Within a PB Object Outline, right-click an event or function element and set the options in the context menu. Your
settings override those in the Options page.
Interface Outlines
The PB Object Outline for interface objects shows indexers, events, functions, and .NET properties.
Interfaces can inherit from other interfaces. When an object implements other interfaces, those interfaces expand to the
same information as the interface object. You can expand each level recursively until there are no more implemented
interfaces.
13
Just as in PowerBuilder Classic, you click File > New to open the New dialog box. The New dialog box is changed in
PowerBuilder .NET: instead of tabbed pages, it has a single page where you can browse all the available objects. The New
dialog box includes these main areas:
Target
Allows you to choose the target in which a selected object will be created.
Filter
Lets you simplify the list by entering a filter expression that displays only a subset of available objects.
A simple filter expression is a string of characters. For advanced filtering, you can include any of the special
Match function characters. Expressions are not case-sensitive.
Examples:
See Help on the Match function for details about special characters.
Object
view
The main part of the window contains a list of all the PowerBuilder object types that you can create, organized
into a hierarchy of folders. When you select an object, a brief description of it is displayed below the view.
14
To remove an item, right-click its entry in the object view and choose Remove .
To restore items that have been removed, right-click a category folder and choose one of these actions:
Reset PB Object Category
Reset All
15
16
The Layout view, where you design the appearance of the window and edit the XAML
The Script view, where you modify behavior by coding window and control scripts
Specify the appearance and behavior of the window by settings its properties
Add controls to the window
Build scripts that determine how to respond to events in the window and its controls
To support these scripts, you can define new events for the window and its controls, and declare functions, structures,
and variables for the window.
Description
Canvas
A canvas defines an area within which you can explicitly position child elements by coordinates relative
to the canvas area.
Dock Panel
A dockpanel defines an area within which you can arrange child elements either horizontally or
vertically, relative to each other.
Grid
A grid defines a flexible grid area consisting of columns and rows. Child elements of a Grid can be
positioned precisely using the Margin property.
Stack Panel
A stackpanel arranges child elements into a single line that can be oriented horizontally or vertically.
Virtualizing Stack
Panel
This is the same layout as StackPanel, but data bound to controls, like listboxes, are only created as
needed when visible.
Wrap Panel
A wrappanel positions child elements in sequential position from left to right, breaking content to the
next line at the edge of the containing box.
6. You can specify the Namespace, Using, and Interface, then click the Next button.
7. Review the WPF window characteristics and then click Finish.
The Window painter opens. The new window displays in the Window painter's Layout view and the XAML defining the
Window are shown in the XAML view.
Defining the WPF Window Propeties
Every window and control has a style that determines how it appears to the user. You define a window's style by choosing
settings in the Window painter's Properties view.
17
Type
Basic appearance
Initial position on the screen
Icon when minimized
Pointer
Note: You can also edit the properties in the XAML view.
1. Click the window's background to display the window's properties in the Properties view.
2. Choose the category appropriate to the property you want to specify.
To specify the window's
PBGeneral
PBGeneral
Transparency
PBGeneral
PBGeneral
PBOther
PBOther
PBScroll
Toolbar placement
PBToolbar
18
19
In the menu bar of windows: Menu bar menus are associated with a window in the Window painter and display
whenever the window is opened.
As pop-up menus: Pop-up menus display only when a script executes the PopMenu function.
Designing menus
PowerBuilder gives you complete freedom in designing menus, but you should follow conventions to make your
applications easy to use. For example, you should keep menus simple and consistent; group related items in a drop-down
menu; make sparing use of cascading menus and restrict them to one or two levels.
A full discussion of menu design is beyond the scope of this documentation. You should acquire information that
specifically addresses design guidelines for graphical applications and apply the rules when you use PowerBuilder to
create your menus.
Building menus
When you build a menu, you:
Displays
All the menu items at the same time when the tree is fully expanded.
Note: In-place text editing is not enabled for Beta. Edit menu names using the Properties view.
The menu as you will see it and use it in your application, with the exception of invisible menu
items that do display.
The Tree Menu view and the WYSIWYG Menu view are equivalent. You can use either view to insert new menu items
on the menu bar or on drop-down or cascading menus, or to modify existing menu items. The menus in both views change
when you make a change in either view.
The two views are separated by a grid splitter. You can resize the views as needed, or hide one view entirely.
You specify menu properties in two views:
20
Displays
Name, Menu Item, and Toolbar Item categories for setting properties for submenu items and
toolbars
21
Description
Contemporary
A 3D-style menu similar to Microsoft Office 2003 and Visual Studio 2005 menus
Traditional
The contemporary menu style has a three-dimensional menu appearance that can include images and menu title bands.
With a contemporary menu, you can set the MenuAnimation, MenuImage, and MenuTitleText at runtime using scripts.
You select a menu style in the Appearance category of the Properties view for the top-level menu object in the Menu
painter. You must select the top-level menu object in the Tree Menu view of the Menu painter to display its Properties
view.
If you select contemporarymenu! in the Menu Style drop-down list, you can customize the display properties for that
style and have them apply to all menu items in the current menu. If you select traditionalmenu! the rest of the menu
style properties do not apply.
For more about using images for menus and toolbars, please refer to the PowerBuilder Users Guide.
Building a New Menu in PowerBuilder .NET
You can build menus that are not based on existing menus.
22
Select File and select Insert Menu Item At End from the pop-up menu
A new item is added to the menu bar after the File menu.
Select Open and select Insert Menu Item from the pop-up menu
A new item is added to the File menu above Open.
Select Open and select Insert Menu Item At End from the pop-up menu
A new item is added to the File menu after Exit.
Select Open and select Insert Submenu Item from the pop-up menu
A new cascading menu is added to the Open menu item.
The first thing you do with a new menu item is add the first item to the menu bar. After doing so, you can continue adding
new items to the menu bar or to the menu bar item you just created. As you work, the changes you make display in both
the WYSIWYG and Tree Menu views.
Inserting the First Menu Bar Item in a New Menu
PowerBuilder .NET Features Guide
23
With any menu bar item selected, select Insert Menu Item At End from the context menu to add an item to the end
of the menu bar.
Select a menu bar item and select Insert Menu Item from the context menu to add a menu bar item before the
selected menu bar item.
2. In the Properties view, enter the text you want for the menu item in the Name category Text box and then press Enter.
Adding an Item to the End of a Menu
You can add items to the end of menus.
Use this procedure to add an item to the end of any menu.
1. Select any item on the menu.
2. Select Insert Menu Item At End from the context menu.
PowerBuilder displays the text none.
3. In the Properties view, enter the text you want for the menu item in the Name category Text box and then press Enter.
Inserting an Item in an Existing Menu
You can insert an item in a menu.
Use this procedure to insert an item in any existing menu:
1. Select the item that should follow the new menu item.
2. Select Insert Menu Item from the context menu.
The word none displays above the item you selected.
3. In the Properties view, enter the text you want for the menu item in the Name category Text box and then press Enter.
Creating Separation Lines in Menus
Use separation lines to separate groups of related menu items with lines.
You should use lines to separate groups of related items.
24
25
1. Select the menu item to which you want to assign a shortcut key.
2. In the Menu Item category in the Properties view, select a key from the ShortcutKey drop-down list.
3. Change ShortcutAlt, ShortcutCtrl, and/or Shortcut Shift to True to create a key combination.
PowerBuilder displays the shortcut key next to the menu item name.
Providing Toolbars in PowerBuilder .NET
To make your application easier to use, you can add toolbars with buttons that users can click as a shortcut for choosing
an item from a menu.
For information on setting the toolbar properties, see the PowerBuilder Users Guide.
Adding Toolbars to a Window
To define toolbars for windows, select pictures for menu commands and then PowerBuilder generates toolbars.
PowerBuilder provides an easy way to add toolbars to a window: when you are defining an item in the Menu painter for
a menu that will be associated with a frame window, sheet, or a main window, you simply specify that you want the menu
item to display in the toolbar with a specific picture. At runtime, PowerBuilder automatically generates a toolbar for the
window containing the menu.
1. In the Menu painter, specify the display characteristics of the menu items you want to display in the toolbar.
For details see Toolbar item display characteristics in the PowerBuilder Users Guide.
2. (Optional) In the Menu painter, specify drop-down toolbars for menu items.
3. In the Window painter, associate the menu with the window and turn on the display of the toolbar.
4. (Optional) In the Window painter, specify other properties, such as the size and location of a floating toolbar, on the
Toolbar property page.
Selecting a Toolbar Style
You select a toolbar style in the Toolbar category of the Properties view for the top-level menu object in the Menu painter.
Toolbars can have a contemporary or traditional style.
26
Description
Contemporary
A 3D-style toolbar similar to Microsoft Office 2003 and Visual Studio 2005
Traditional
Toolbars that you import or migrate from earlier versions of PowerBuilder have the traditional style, and new toolbars use
the traditional toolbar style by default.
1. Select the top-level menu object.
2. In the Toolbar category of the Properties view, select the toolbar style you want, traditionaltoolbar! or
contemporarytoolbar!
27
In the Properties view for the window, enter the name of the menu in the MenuName text box in the PBGeneral
category.
Click the Browse button and select the menu from the Select Menu dialog box, which lists all menus available to
the application.
In the Select Object dialog box, you can search for a menu by clicking the Browse button.
3. Click Save to associate the selected menu with the window.
Add and Change Menu Bars Using Scripts
You can use PowerScript to assign and change menu bars in Windows.
28
User Objects
Applications often have features in common. If you find youself using the same application feature repeatedly, you should
define a user object; you define the user object once in the User Object painter and use it as many times as you need.
For example, you might often reuse features like the following:
29
In the Toolbox, select the group to which you want to add the WPF control.
Right-click in the Toolbox group and select Choose Items.
Select the WPF Components tab.
You can select a standard WPF control in the tab, or use the Browse button to select your own WPF control.
Click OK.
The WPF control is added to the Toolbox.
In PowerBuilder .NET, you can add built-in WPF controls and user-developed controls.
1. Select Custom Control in the Toolbox (found in the DataWindow Controls group).
2. Click on the location in the DataWindow where you want to place the custom control.
The Select Custom Control dialog box opens.
3. Do one of the following:
Click the ellipsis button next to the From File field and then navigate to the location of the XAML file defining the
custom control.
Click the ellipsis button next to the From Assembly field and then select the control.
31
32
A WPF Window Application target can support WPF Window Application projects and WCF Client Proxy projects.
The only project type available for .NET Assembly targets is the .NET Assembly project type. The only project type
available for .NET Web Service targets is the .NET Web Service project type.
Windows XP SP2, Windows 2003, Windows Vista, or Windows 2008 operating system
.NET Framework 2.0 or later
The Microsoft Visual C++ runtime libraries msvcr71.dll and msvcp71.dll and the Microsoft .NET Active
Template Library (ATL) module, atl71.dll
PowerBuilder .NET assemblies in the global assembly cache (GAC)
PowerBuilder runtime dynamic link libraries in the system path
For more information on the required runtime files, see Deploying PowerBuilder runtime files in the Deploying
Applications to .NET book for PowerBuilder Classic.
For .NET Web Service targets, production servers must also have:
For information on configuring IIS, selecting the default ASP.NET version, and examples of how to grant ASP.NET user
permissions, see the first chapter in the Deploying Applications to .NET book for PowerBuilder Classic.
33
4. Follow the remaining instructions of the New WPF Target wizard and click Finish.
The New WPF Target wizard creates a project object and a target and a that allows you to deploy the application.
Tip: When the Finish button is enabled at any point in this procedure, you can click it to skip the remaining steps and
create a target with just the values you have provided. You can add or change values in the target painter later.
Description
Application name
Library
doe\My Documents\pbnet\wpfapp.pbl
Target
doe\My Documents\pbnet\wpfapp.pbtx
Project name
Product name
Product version
Major, Minor, Build, and Revision version numbers to be associated with this target.
Optionally, identify resource files and folders that are not compiled with the target but need to be delivered with the application.
Use the browser buttons to select individual files, directories, or
contents in PBR resource files.
34
Description
Resource dictionaries
Optionally, identify WPF resource dictionaries that the application will use.
From shared
path
How does the application check for the latest version and update?
Choose one of these options:
Description
Target
35
Description
36
Wizard field
Description
Project name
Library
Description
Target
Lets you add PBLs and PBDs to the search path for the new
target.
Description
Lets you add a description for the project object the wizard creates.
Namespace
Provides a globally unique name to assembly elements and attributes, distinguishing them from elements and attributes of the
same name but in different assemblies.
Name of the setup file the wizard creates. You can copy this MSI
file to client computers, then double-click the files to install
the .NET assembly on those computers.
Description
Choose a target
Select a name for the project you want to create. You must create
a project object to deploy nonvisual objects as .NET components.
37
Description
Specify a library from the list of target libraries where you want
to store the new project object.
Expand the library node or nodes in the list box and select check
boxes next to the nonvisual objects that you want to deploy.
38
Description
Project name
Library
Target
Lets you add PBLs and PBDs to the search path for the new
target.
Description
Lets you add a description for the project object the wizard creates.
The directory path you want to use as the current directory in the
virtual file system on the server. By default, this is the full path
name for the current target.
Select this option to deploy the Web service in an MSI file. When
you select this option, you must provide a name for the setup
file.
This field is enabled only if you select the Generate Setup File
option. You use it to name the setup file the wizard creates. You
can copy this MSI file to client computers, then double-click the
files to install the .NET Web Service on those computers.
39
Description
Choose a target
Select a name for the project you want to create. You must create
a project object to deploy nonvisual objects as .NET components.
Specify a library from the list of target libraries where you want
to store the new project object.
Expand the library node or nodes in the list box and select check
boxes next to the nonvisual objects that you want to deploy.
40
ASMX services that use arrays of simple datatypes are not supported. (Simple datatypes are supported.)
ASMX services that use user-defined datatypes inheriting from .NET datatypes are not supported. (User-defined
datatypes defined in a WSDL file, and arrays of these datatypes are supported.)
WCF services that use bindings other than BasicHttpBinding, WSHttpBinding, or netTCPBinding are not supported.
Connection to a service through a proxy server is not supported.
.
Note: You must install the .NET Framework SDK 3.5 to use the WCF feature. The WCF Client Proxy project uses a tool
from the SDK to access a service contract (svc or wsdl). This tool (SvcUtil.exe) parses the service contract and
generates C# files. The C# compiler (CSC.exe from .NET 3.5 runtime) then builds the newly generated C# code into a
private assembly, which is automatically referenced by the project.
The nonvisual user object (NVO) proxy generated by the WCF Client Proxy project allows PowerBuilder .NET
application users to consume a Web service. The proxy NVO represents the service class defined by the Web service
contract, which is also incorporated in a private assembly generated by the WCF client project.
The generated proxy layer uses PowerScript and .NET interoperability to pass the call to the assembly and get a return
value from the Web service. This is different from the approach used in PowerBuilder Classic, where the generated proxy
uses the PowerBuilder Native Interface (PBNI) for data exchange. For this reason, you cannot migrate existing Web
service clients from PowerBuilder Classic to the WCF engine.
The WCF client engine allows PowerBuilder .NET application users to consume WSE (Web Service Enhancement)
extensions in addition to other Web services. The WSE extensions cannot be accessed by the EasySoap and .NET SOAP
engines available in PowerBuilder Classic.
Next and complete the wizard, entering or selecting values for the Web Service Definition Language (WSDL) file,
the proxy name prefix and assembly, services and ports, the project name and library, and the library for the
proxy.
Finish and complete project property selections in the Project painter.
For the WSDL File Name, you can enter or choose files with the WSDL or ASMX extension.
You can click Finish at any time in the wizard and edit any default values in the Project painter.
3. Build the project.
PowerBuilder creates an assembly that can connect to the Web service.
4. Create an instance of the generated assembly in a PowerBuilder .NET target.
5. (Optional) Create an instance of WCFConnection, and set its binding and related properties.
6. Call a method of the instance of the generated assembly.
41
42
With text
In color
In an ancestor as well as in the object or control you are working Half in color
with
Description
For a control
Double-click a scriptable control, or select Script from the PainterBar or a pop-up menu.
For a function or event Double-click an item in the Event list or Function list views, or select the function or event from the
second drop-down list in an open Script view.
43
Description
To specify
Editing Scripts
You can perform standard editing tasks in the Script view using the Edit menu, the pop-up menu in the Script view, or the
PainterBars. There are shortcuts for many editing actions.
Tip: You can set up your own shortcuts. Select Tools > Options, then Environment > Keyboard in the Options dialog
box.
For more information, see the PowerBuilder Users Guide.
Code Snippets
You can store short code snippets and reuse them in scripts.
Code snippets enable you to store and reuse pieces of code in multiple scripts or files. Snippets are similar to clips in the
PowerBuilder Classic environment.
PowerBuilder .NET provides a library of PowerBuilder-specific snippets that are ready to use. These are available with
the Insert Snippet and Surround Snippet functions when you are editing code in the PowerScript editor.
For information about adding, using, and managing Intellisense Code Snippets, refer to the Visual Studio Help.
IntelliSense
IntelliSense is a tool that helps you write PowerScript code more quickly by providing a lookup and paste service inside
the Script view.
IntelliSense is a feature of Visual Studio similar to Autoscript in PowerBuilder Classic.
44
When you can remember part of the name and you want IntelliSense to finish typing it for you or show you a list of
alternatives.
When you cannot remember the name or you just want a list. IntelliSense options can help you narrow the list if you
do not know the name but you do know the type you are looking for.
When you want a list of the properties and/or functions and events that apply to an identifier followed by a dot.
Errors
Warnings
Information messages
For more information about messages, see the PowerBuilder Users Guide.
45
GoTo Definition
Not enabled in CTP
46
Object or control
Unsupported properties
Application object
ToolbarUserControl
CheckBox
Automatic
DataWindow
Unsupported properties
DatePicker
AllowEdit
DropDownListBox
HScrollBar. IMEMode
DropDownPictureListBox
HScrollBar. IMEMode
EditMask
ListBox
TabStop
ListView
IMEMode
Menu
MenuCascade
MultiLineEdit
Picture
PictureButton
PictureHyperLink
PictureListBox
TabStop
RadioButton
Automatic
RichTextEdit
Accelerator, ControlCharsVisible, DisplayOnly, ImeMode, PicturesAsFrame, Resizable, ReturnsVisible, RulerBar, SpacesVisible, TabBar, TabsVisible, Underline, UndoDepth, and WordWrap
SingleLineEdit
HideSelection, IMEMode
UserObject
Style
Window
MdiClientColor
Note: Several properties are renamed with a "PB" prefix. For example, Height and Width properties are set as PBHeight
and PBWidth; the Tag and FontFamily properties are set as PBTag and PBFontFamily. TabOrder is included as a property
in the Property view for an object or control.
Unsupported PowerScript events
The following table lists PowerBuilder .NET controls with unsupported PowerScript events:
Control
Unsupported events
All controls
Other
DatePicker
MonthCalendar
DoubleClicked
RichTextEdit
47
Unsupported functions
Application object
SetTransPool
Obsolete method: SetLibraryList
DataStore
DataWindow
DataWindowChild
48
EditMask
RichTextEdit
UserObject
Window
Requirements
Framework
Guarantees interoperability across different .NET languages. A CLS compliant .NET library is called a framework.
Consumer
A CLS consumer must be able to use CLS compliant libraries, but cannot extend the CLS framework. The CLS
compliant consumer must be able to:
Extender
A CLS extender must allow users to consume and extend the CLS Framework. Everything that applies to CLS
consumers also applies to CLS extenders, but extenders must also be able to:
Define new nongeneric CLS compliant types that extend CLS compliant base types
Implement any CLS compliant interface
Place CLS compliant custom attributes on appropriate elements
With PowerBuilder .NET, you can create extensions to other CLS compliant languages and deploy components that can
be consumed by any CLS compliant application.
Several enhancements to the PowerScript language enable PowerBuilder .NET to support its CLS-extender role:
Ability to call .NET classes and methods without using preprocessor symbols (such as PBDOTNET) in #IF DEFINED
code blocks
Ability to define and implement interfaces
Support for array enhancements
Ability to consume .NET delegates
Ability to inherit from .NET Classes
Support for parameterized constructor events
Ability to define and consume custom attributes (UI not available in beta1)
Ability to consume generic types
Support for defining namespaces
Support for indexers
Support for user-defined enumerations
Support for additional bitwise operators
Support for StringBuilder system class (Not available in beta1)
Support for methods of .NET system.object in PowerObject class
Support for XML documentation comments (UI not available in beta1)
Support for language enhancements in .NET assembly and Web Service targets (Not available in beta1)
The .NET component targets in the PowerBuilder .NET IDE support a framework role for CLS compliance, since the
components generated from these targets can be consumed by any other .NET language. The WPF Window Application
targets in PowerBuilder .NET are CLS extenders because they allow you to consume and extend the CLS framework.
PowerBuilder .NET Features Guide
49
50
to return an array on a new event, select the object name in the upper left drop-down list and New Event in the
second drop-down list.
to return an array on a new function, select Functions in the upper left drop-down list.
Note: You can also add an array datatype on a new function object that you define from the New dialog box.
2. Type the datatype followed by brackets in the Return Type drop-down list.
Note: You can add commas inside the brackets for multidimensional arrays.
3. Complete the remaining prototype fields available for the event or function, and add script for the new method in the
scripting area.
For a function script, you must include a return value that matches the array datatype you entered in the previous
step.
This example shows PowerScript syntax for a function that returns an array of type integer:
public function integer[] ut_test_array ()
integer ret[]
ret = {1, 2}
return ret
end function
BitRight operator
The right-shift operator shifts its first operand to the right by the number of bits specified in its second operand. This works
the same as the C# >> operator.
The shift to the right can be arithmetic or logical, depending on the datatype of the first operand:
Arithmetic - If the first operand is an integer or a long, high-order empty bits are set to the sign bit.
Logical - If the first operand is an unsigned integer (uint) or unsigned long (ulong), high-order bits are filled with
zeros.
BitLeft operator
The left-shift operator shifts its first operand to the left by the number of bits specified in its second operand. This works
the same as the C# << operator. The datatype of the second operand must be an integer.
The high-order bits of the first operand are discarded and the low-order empty bits are filled with zeros. Shift operations
never cause overflows. The shift amount to the left depends on the bit quantity of the first operand datatype:
32-bit quantity - If the first operand is a long or ulong, the shift amount is given by the low-order five bits of
the second operand. The maximum left shift is 0x1f or 31 bits.
64-bit quantity - If the first operand is a longlong or ulonglong, the shift amount is given by the low-order six
bits of the second operand. The maximum left shift is 0x3f or 63 bits.
51
Defining an Interface
An interface specifies the members of a class that must be supplied by any class that implements the interface. In
PowerBuilder .NET, you can create interfaces from the New dialog box.
Because PowerScript has no concept of abstract classes, all methods, properties, events, and indexers defined in
PowerBuilder .NET interfaces (including ancestor interfaces) must be implemented by a PowerBuilder object class.
1. In the New dialog box, select PBObject>Interface, and
2. Select New Event in the second drop-down list of the Interface painter to add events to the interface, and enter values
and parameters for each new event that you add.
If you added functions, indexers, or properties, or made declarations as described in the next step (step 3), you must
select the interface name (or Untitled if you did not provide a name for the interface) from the first drop-down list
before you can select New Event in the second drop-down list.
3. Select Functions, Indexers, Properties, or Declare in the first drop-down list of the Interface painter to
add functions, indexers, or properties to the interface, or to declare a namespace or another interface.
A new painter window displays for the item you select. For new functions, indexers, and properties, or to switch
between declarations for namespaces and other interfaces, you might need to select an appropriate item from the
second drop-down list in the painter window.
Add as many functions, indexers, properties or declarations as required for the interface.
4. Save the interface.
If you did not provide a name for the interface in the Interface wizard, the Save Interface dialog box prompts you for
an interface name and the library where you want to save the interface.
52
DataWindow
IDataWindowControl
DataWindowChild
IDataWindowChild
DataStore
IDataWindowStore
The following syntax defines a function that determines the number of rows in a DataWindow or DataStore after a filter
is applied:
public function long f_filter (IDataWindowBase idw_base,
string as_filter);
long ll_rows
idw_base.SetFilter (as_filter)
idw_base.Filter ()
return idw_base.RowCount ()
end function
You can then call this function in a script, passing in a valid DataWindow or DataStore and the value you want to use as
a filter. The following script filters a DataStore on a department ID of 100:
DataStore ldw_emps
ldw_emps = Create DataStore
ldw_emps.DataObject = "d_myDWO"
ldw_emps.SetTransObject (SQLCA)
// Assumes a connected
transaction
ldw_emps.Retrieve ()
this.f_Filter (ldw_emps, "dept_id = 100")
IPicture
PowerBuilder .NET also provides an IPicture interface that exposes all the common methods of the PowerBuilder picture
control. The following example calls the SetPicture and Draw methods on an object that inherits from the IPicture
interface:
IPicture ip = p_1
ip.SetPicture (myPictureBlob)
ip.Draw (x, y)
The IDataWindowControl and IDataWindowChild interfaces also use the IPicture system interface to set the picturename
parameter in the SetRowFocusIndicator method of a DataWindow or DataWindowChild control.
Implementing an Interface
To use the functionality of an interface, you must create a class that implements the interface, or derive a class from one
of the .NET Framework classes that implements the interface.
The following types of PowerBuilder .NET objects can implement interfaces: Custom Class, Standard Class, Custom
Visual, External Visual, Standard Visual, Window, and Menu objects.
53
Open the painter for the object with a declared interface that you want to delete.
Select Declare in the first drop-down list and Interfaces in the second drop-down list.
Right-click the interface you want to delete and select Delete from the pop-up menu.
In the Delete Interface dialog box, clear any checked functions, indexers, or properties that you want to keep.
Click OK.
The Delete Interface dialog box closes. If you open the PB Object Outline view, you still see any functions, indexers,
or properties that you chose to keep.
Delegate declaration
The following C# syntax declares delegate types named Func and FuncAsync in a .NET assembly that you import to
your PowerBuilder .NET target.
.NET class declaration in C# (in an external assembly):
using System;
delegate double Func(double x);
delegate double FuncAsync(double[] a);
The example for the synchronous use case that follows consumes the Func delegate, and the example for the
asynchronous use case consumes the FuncAsync delegate.
Synchronous use case
The following PowerScript syntax uses the delegate type Func from the external DLL that you import to your target. The
delegate signature requires a function that takes a double and returns a double value.
public function double[] of_apply (double a_v[], Func a_f)
double result[]
for i = 0 to i < a_v.Length step 1
result[i] = a_f (a_v[i])
next
return result
end function
55
56
Description
objectname
type
calltype
A keyword specifying when PowerBuilder looks for the function/event. Values are:
FUNCTION (Default)
EVENT
STATIC (Default)
DYNAMIC
57
Description
when
A keyword specifying whether the function or event should execute immediately or only after the current script is finished.
Values are:
name
argumentlist
The values you want to pass to the function or event. Each value
in the list must have a datatype that corresponds to the declared
datatype in the function or event definition or declaration.
Declaring a Namespace
You can specify a namespace for the following kinds of PowerBuilder objects: Custom and Standard Class objects,
Custom, Standard, and External Visual objects, windows and menus, structures and functions, and interfaces and
enumerations.
You declare a namespace in the Declare Namespace window of an object painter that supports namespace declarations.
You can also add Using (namespace) directives in the Declare Namespace window. Using directives allow you to refer to
a named type by its simple name rather than its compound name that includes a namespace prefix.
1. Open a painter for a PowerBuilder object for which you want to declare a namespace.
The painter opens automatically when you create a new object.
2. Select Declare in the upper left drop-down list in the painter and Namespace in the second drop-down list.
Note: You could click the Namespace tab at the bottom of the object painter rather than selecting the drop-down list
items mentioned in this step.
3. If the current object has an ancestor object, and you want the namespace to apply to the ancestor object as well as the
current object, select the ancestor in the third drop-down list.
Note: This feature is not implemented in the current beta release.
4. Type your namespace declaration in the Namespace text box.
The namespace declaration applies only to the selected object and any objects that inherit from the selected object.
Skip the next step if you do not want to include a Using directive in the source code for the current object.
5. Click the Add button to open the Select Namespaces dialog box and include a Using directive.
a) Select an assembly or other item from the Assemblies list box.
The list of namespaces declared for the selected item displays in the top list box.
b) Select a namespace from the top list box and click OK.
The dialog box closes and the namespace you selected displays in the Using list box of the object painter.
59
61
62
Parts of a Graph
Before using graphs in an application, you need to understand the parts of a graph.
Here is a column graph created in PowerBuilder that contains most major parts of a graph. It shows quarterly sales of three
products: Stellar, Cosmic, and Galactic printers.
Meaning
Series
A set of data points Each set of related data points makes up one series. Each series in a graph is
distinguished by color, pattern, or symbol.
Categories
The major divisions of the data Series data are divided into categories, which are often non-numeric.
Categories represent values of the independent variable(s).
Values
63
What it is
Title
An optional title for the graph. The title appears at the top of the graph.
Value axis
The axis of the graph along which the values of the dependent variable(s) are plotted. In a column graph,
for example, the Value axis corresponds to the y axis in an XY presentation. In other types of graphs, such
as a bar graph, the Value axis can be along the x dimension.
Category axis
The axis along which are plotted the major divisions of the data, representing the independent variable(s).
In column graphs, the Category axis corresponds to the x axis in an XY presentation. These form the major
divisions of data in the graph.
Series
A set of data points. In bar and column charts, each series is represented by bars or columns of one color
or pattern.
Series axis
The axis along which the series are plotted in three-dimensional (3D) graphs.
Legend
An optional listing of the series. The preceding graph contains a legend that shows how each series is
represented in the graph.
64
You can have pie and donut graphs with more than one series if you want; the series are shown in concentric circles.
Multiseries pie and donut graphs can be useful in comparing series of data.
Mileage
10
12
6.00
20
18
3.00
30
21
2.00
40
23
1.50
50
26
1.20
60
26
1.00
70
24
0.86
80
20
0.75
This scatter graph shows the data from the first two columns:
65
This bubble graph shows the data from all three columns:
Figure 3: Bubble graph of the effect of speed on mileage and distance traveled:
SetBubbleSize Function
The SetBubbleSize function is used to define the size of the bubbles in a bubble graph.
66
Description
controlName
The name of the graph in which you want to set the bubble size, or the name of the DataWindow
control containing the graph.
(Optional) A string whose value is the name of the graph in the DataWindow control.
seriesNumber
The number of the series in which you want to set the bubble size.
itemNumber
The number of the data point for which you want to set the bubble size.
size
Return value
Returns 0 if successful, 1 for no action. If an error occurs, SetBubbleSize returns a negative integer. Values are:
Usage
In bubble graphs, you can plot three data values on two axes, one x and two y. The size of the bubble is proportional to
the value it represents. Use SetBubbleSize to define the size of the bubbles.
Example
This statement changes the size of the first bubble in the first series of graph gr_1 in the DataWindow control dw_1 to
25.
dw_1.SetBubbleSize("gr_1", 1, 1, 25)
BubbleSize Property
The size of a bubble in a bubble graph.
Syntax
PowerBuilder dot notation:
controlName.Object.graphname.BubbleSize
67
Description
controlName
The name of the graph in which you want to set the bubble size, or the name of the DataWindow control
containing the graph.
graphName
A string whose value is the name of the graph in the DataWindow control.
size
Usage
In the painter, select the graph control and set the value in the Properties view, Graph group.
Three-Dimensional Graphs
You can create three-dimensional (3D) graphs of area, bar, column, line, pie, and donut graphs.
For more on generating 3D graphs, see the PowerBuilder Users Guide.
The Render3D property is supported in PowerBuilder .NET for backward compatibility, but it will work only for
Column3D and Bar3D graphs.
Radar Graphs
Radar graphs graphically display multivariate data (with three or more quantitative variables) in a two-dimensional chart
represented on axes starting from the same point.
Radar graphs display data points on radii, displaying the data in a way that allows you to see patterns such as dominant
variables, outliers, and other patterns in the data.
68
Stacked Graphs
In bar and column graphs, you can choose to stack the bars and columns.
In stacked graphs, each category is represented as one bar or column instead of as separate bars or columns for each
series.
Cone Graphs
The cone graph style shows the percentage of every value in a series of data.
A cone graph represents one series of data. Different colors represent different data items in the series, and the heights
represent the percentage it takes from the sum of the series.
69
70
DataWindows
DataWindows
You build DataWindow objects to retrieve, present, and manipulate data in your applications.
Composite
Crosstab
71
DataWindows
Using this DataWindow wizard
Freeform
With the data columns going down the page and labels next to each column
Graph
Grid
With data in row and column format with grid lines separating rows and columns
Group
Label
N-Up
RichText
That combines input fields that repesent database columns with formatted text
Tabular
With data columns going across the page and headers above each column
TreeView
With data grouped in rows in a TreeView; the TreeView displays the data hierarchically in a way that allows you to expand and collapse it
72
DataWindows
Note: In an n-up report, the data is displayed across and then down. If you want your data to go down the page and then
across in multiple columns, as in a phone list, you should create a standard tabular report, then specify newspaper
columns.
73
DataWindows
Note: While in the SQL Select painter, you can save the current SELECT statement as a query by selecting File > Save
As from the menu bar. Doing so allows you to easily use this data specification again in other DataWindows.
74
Options
Description
Each table you select is highlighted. (To deselect a table, click it again.) Click
the Open button to close the Select Tables dialog box.
DataWindows
Options
Description
Double-click the name of each table or Each object opens immediately behind the Select Tables dialog box. Click the
Cancel button to close the Select Tables dialog box.
view you want to open
Representations of the selected tables and views display. You can move or size each table to fit the space as needed.
Description
Move the pointer to the table name and select Select All from the pop-up menu.
Drag a column in the Selection List with the mouse. Release the mouse button when the
column is in the proper position in the list.
To see a preview of the query results, click the Execute button in the Painter bar. A table displaying the query results appear
in the Results tab.
Click the OK button to open the DataWindow painter.
Description
substr("employee"."emp_fname",1,2)
3. You can display the pop-up menu for any row in the Compute view. Using the pop-up menu, you can select and paste
the following into the expression:
75
DataWindows
The functions listed here are provided by your DBMS. They are not PowerBuilder functions. This is so because you
are now defining a SELECT statement that will be sent to your DBMS for processing.
4. Press the Tab key to get to the next row to define another computed column, or click another tab to make additional
specifications.
PowerBuilder adds the computed columns to the list of columns you have selected.
Defining Queries
This feature is not supported in CTP.
76
DataWindows
DataWindow Painter
The DataWindow painter provides views related to the DataWindow object you are working on.
The following picture shows a DataWindow object in the DataWindow painter.
77
DataWindows
Band
Used to Display
Header
Detail
Summary
Footer
If the presentation style is Tabular, Grid, or N-Up, the headings defined for the columns in the Database painter display
in the header band and the columns display on a single line across the detail band
If the presentation style is Freeform, the header band is empty and labels display in the detail band next to each
column
You can specify additional heading information (such as a date) in the header band and you can include pictures, graphic
controls, and color to enhance the appearance of the band.
Note: To include the current date in the header, you place a computed field that uses the Today DataWindow expression
function in the header band.
Detail Band in DataWindows
The detail band displays the retrieved data. It is also where the user enters new data and updates existing data.
The number of rows of data that display in the PowerBuilder at one time is determined by the following expression:
(Height of the DataWindow object - Height of headers and footers) / Height of the detail band
The presentation style is Tabular, Grid, N-Up, or Label, the detail band displays column names, representing the columns
If the presentation style is Freeform, the labels defined for the columns in the Database painter display in the detail band
with boxes for the data to the right.
When you design the detail band of a DataWindow object, you can specify display and validation information for each
column of the DataWindow object and add other controls, such as text, pictures, graphs, and drawing controls.
78
DataWindows
How PowerBuilder names the columns in the Design view
If the DataWindow object uses one table, the names of the columns in the Design view are the same as the names in the
table.
If the DataWindow object uses more than one table, the names of the columns in the Design view are
tablename_columnname. PowerBuilder prefaces the name of the column with the table name to prevent ambiguity, since
different tables can have columns with the same name.
Summary and Footer Bands
The summary and footer bands are similar to the summaries and footers in a printed report.
You use the summary and footer bands of the DataWindow object the same way you use summary pages and page footers
in a printed report:
The contents of the summary band display at the end, after all the detail rows; this band often summarizes information
in the DataWindow object
The contents of the footer band display at the bottom of each screen or page of the DataWindow object; this band often
displays the page number and name of the report
79
DataWindows
Rectangle
RoundRectangle
Line
Oval
1.
2.
3.
4.
DataWindows
To visually enhance the layout of a DataWindow object you can add a group box. A group box is a static frame used to
group and label a set of controls in a DataWindow object.
1. Select GroupBox in the Toolbox.
2. Click where you want the control to display
3. With the group box selected, edit the Text property in the General category in the Properties view. This changes the
text to display in the frame.
4. Move and resize the group box as appropriate.
81
DataWindows
To display
In this band
Today()
Header
Now()
Header
Page()
Footer
PageCount()
Footer
Concatenation of Fname and Lname columns for Fname + " " + Lname
each row
Detail
Salary / 12
Detail
Detail
Avg(Salary)
Summary
Count of retrieved rows, assuming each row contains a value for EmpID
Count(EmpID)
Summary
You can refer to other rows in a computed field. This is particularly useful in N-Up DataWindow objects when you want
to refer to another row in the detail band. Use this syntax:
ColumnName[x]
where x is an integer. 0 refers to the current row (or first row in the detail band), 1 refers to the next row, -1 refers to the
previous row, and so on.
For complete information about the functions you can use in computed fields in the DataWindow painter, see the
DataWindow Reference.
Computed Columns Versus Computed Fields
You define computed columns in the SQL Select painter, and the value is calculated by the DBMS when the data is
retrieved. You define computed fields in the DataWindow painter, and the value is calculated after the data has been
retrieved.
When creating a DataWindow object, you can define computed columns and computed fields as follows:
In the SQL Select painter, you can define computed columns when you are defining the SELECT statement that will
be used to retrieve data into the DataWindow object.
In the DataWindow painter, you can define computed fields after you have defined the SELECT statement (or other
data source).
When you define the computed column in the SQL Select painter, the value is calculated by the DBMS when the data is
retrieved. The computed column's value does not change until data has been updated and retrieved again.
When you define the computed field in the DataWindow painter, the value of the column is calculated in the DataWindow
object after the data has been retrieved. The value changes dynamically as the DataWindow object changes.
Tip: If you want your DBMS to do the calculations on the server before bringing data down and you do not need the
computed values to be updated dynamically, define the computed column as part of the SELECT statement.
If you need computed values to change dynamically, define computed fields in the DataWindow painter Design view.
Consider a DataWindow object with four columns: Part number, Quantity, Price, and Cost. Cost is computed as
Quantity * Price.
82
DataWindows
Part#
Quantity
Price
Cost
101
100
1.25
125.00
If Cost is defined as a computed column in the SQL Select painter, the SELECT statement is as follows:
SELECT part.part_num,
part.part_qty
part.part_price
part.part_qty * part.part_price
FROM part;
If the user changes the price of a part in the DataWindow object in this scenario, the cost does not change in the
DataWindow object until the database is updated and the data is retrieved again. The user sees a display with the changed
price but the unchanged, incorrect cost.
Part#
Quantity
Price
Cost
101
100
2.50
125.00
If Cost is defined as a computed field in the DataWindow object, the SELECT statement is as follows, with no computed
column:
SELECT part.part_num
part.part_qty
part.part_price
FROM part;
The computed field is defined in the DataWindow object as Quantity * Price.
In this scenario, if the user changes the price of a part in the DataWindow object, the cost changes immediately.
Part#
Quantity
Price
Cost
101
100
2.50
250.00
1. Place the mouse pointer over the PainterBar and select Customize from the pop-up menu.
The Customize dialog box displays.
2.
83
DataWindows
Effect
NoAction (default)
RetrieveYield
Retrieves rows from the database. The option to yield is not automatically turned on.
Retrieve
Cancel
84
Value
-1 if retrieve fails
-1 if retrieve fails
0
DataWindows
Action
Effect
Value
PageNext
The row displayed at the top of the DataWindow control when the scrolling is
complete or attempts to go past the first
row.
-1 if an error occurs.
PagePrior
The row displayed at the top of the DataWindow control when the scrolling is
complete or attempts to go past the first
row.
-1 if an error occurs.
PageFirst
1 if successful.
-1 if an error occurs.
PageLast
The row displayed at the top of the DataWindow control when the scrolling is
complete or attempts to go past the first
row.
-1 if an error occurs.
Sort
Filter
DeleteRow
1 if successful.
-1 if an error occurs.
1 if successful.
AppendRow
11
InsertRow
Update
1 if successful.
15
Preview
PreviewWithRulers
17
QueryMode
18
QuerySort
19
SaveRowAs
-1 if an error occurs
-1 if an error occurs
85
DataWindows
Action
Effect
Value
QueryClear
20
86
These functions work the same as in PowerBuilder Classic; for more information see thePowerBuilder Users Guide.
87
Description
fileName
Name and location of the trace log file. If you do not specify a full path name, the log file is saved in the
current directory. If you do not use this parameter, the DSI trace will not be generated.
disableDBITrace
(optional)
Use to set or cancel DBI tracing when DSI tracing is enabled. This parameter is not valid for PBADO drivers.
Values are:
88
Description
showFetchData (optional)
Use to include or exclude data from fetch buffers in the DSI trace log file. Values are:
>
</configSections>
...
<DSITrace fileName="c:\dsitrace.log" disableDBITrace="1"
showParameters="1"
showFetchData="1" /
>
...
</configuration>
89
90
WCFConnection Object
The WCFConnection object includes all options for calling WCF services. You create a WCFConnection object
automatically when you build a WCF Client Proxy project.
The WCFConnection object is an instance of the WCFConnection class.
Properties
WCFConnection property
Type
Description
BindingType
WCFBindingType (enumeration)
ClientCredential
WCFClientCredential (class)
91
Type
Description
EndpointAddress
WCFEndpointAddress (class)
ProxyServer
WCFProxyServer (class)
Timeout
String
BasicHttpBinding
WCFBasicHttpBinding (class)
wsHttpBinding
WCFwsHttpBinding (class)
NetTcpBinding
WCFNetTcpBinding (class)
WebHttpBinding
WCFWebHttpBinding (class)
ws2007HttpBinding
WCFws2007HttpBinding (class)
wsFederationHttpBinding
WCFwsFederationHttpBinding
(class)
92
Type
Description
NetMSMQBinding
WCFNetMSMQBinding (class)
Events
WCFConnection event
Occurs
Constructor
Destructor
Functions
WCFConnection
function
Datatype
returned
Description
ClassName
String
GetContextService
Integer
GetParent
PowerObject
PostEvent
Boolean
Adds an event to the end of the message queue for the control
TriggerEvent
Integer
Triggers a specified event in the control and executes the script for
the event
TypeOf
Object
BasicHttpMessageSecurity Class
The BasicHttpMessageSecurity class enables you to get and configure the message security settings of a
BasicHttpBinding binding for a WCF client.
Properties
BasicHttpMessageSecurity
property
Type
Description
SecurityAlgorithm
SecurityAlgorithmType
(enumeration)
93
Type
Description
BASIC128HA256,
BASIC128SHA256RSA15A15, BASIC192,
BASIC192RSA15, BASIC192HA256,
BASIC192SHA256RSA15, BASIC256
(default), BASIC256RSA15,
BASIC256HA256,
BASIC256SHA256RSA15, TRIPLEDES,
TRIPLEDESRSA15, TRIPLEDESSHA256,
and TRIPLEDESSHA256RSA15.
ClientCredentialType
BasicHttpMessageCredentialType
(enumeration)
BasicHttpSecurity Class
The BasicHttpSecurity class configures the security settings of a BasicHttpBinding binding for a WCF client.
Properties
BasicHttpSecurity
property
Type
Description
SecurityMode
BasicHttpSecurityMode
(enumeration)
Transport
Message
BasicHttpMessageSecurity
(class)
ClientCertificateCredential Class
The ClientCertificateCredential class enables you to select a client certificate for a secure connection to a Web service.
Properties
94
ClientCertificateCredential
property
Type
Description
SubjectName
string
StoreLocation
CertStoreLocation
(enumeration)
StoreName
CertStoreName
(enumeration)
HttpTransportSecurity Class
The HttpTransportSecurity class enables you to get and configure transport security settings for a WCF Web service that
uses BasicHttpBinding, WebHttpBinding, or wsHttpBinding bindings.
Properties
HttpTransportSecurity
property
Type
Description
Realm
string
ClientCredentialType
HttpClientCredentialType
(enumeration)
HttpDigestCredential Class
The HttpDigestCredential class provides credential information that allows a WCF client to use a proxy server, or connect
to a Web service that requires digest authentication.
Invoke objects of the HttpDigestCredential class from the HttpDigest property of WCFClientCredential class objects.
Properties
HttpDigestCredential
property
Type
Description
UserName
UserNameCredential
(class)
AllowImpersonationLevel
ImpersonationLevel
(enumeration)
MessageSecurityOverTcp Class
The MessageSecurity class configures message-level security settings for a message sent using TCP transport.
95
Type
Description
AlgorithmSuite
SecurityAlgorithmType
(enumeration)
ClientCredentialType
MessageCredentialType
(enumeration)
NetTcpSecurity Class
The NetTcpSecurity class configures the security settings of a NetTcpBinding binding for a WCF client and WCF
service.
Properties
NetTcpSecurity
property
Type
Description
SecurityMode
wsSecurityMode
(enumeration)
Gets or sets the security mode for the binding. Values are: None,
Transport (default), Message, and
TransportWithMessageCredential.
Transport
Message
MessageSecurityOverTcp
(class)
NoDualHttpMessageSecurity Class
The NoDualHttpMessageSecurity class represents message-level security settings over an HTTP protocol where security
is not set for two-way communication.
Properties
96
NoDualHttpMessageSecurity Type
property
Description
SecurityAlgorithm
SecurityAlgorithmType
(enumeration)
Description
BASIC192SHA256RSA15, BASIC256 (default),
BASIC256RSA15, BASIC256HA256,
BASIC256SHA256RSA15, TRIPLEDES,
TRIPLEDESRSA15, TRIPLEDESSHA256,
TRIPLEDESSHA256RSA15, and
TRANSPORTWITHMESSAGECREDENTIAL.
ClientCredentialType
EstablishSecurityContext
boolean
NegotiateServiceCredential
boolean
ServiceCertificateCredential Class
The ServiceCertificateCredential class provides a client certificate for a secure connection to a Web service. Use this class
instead of the ClientCredentialService class when message-level security is enabled for the service.
Properties
ServiceCertificateCredential
property
Type
Description
SubjectName
string
StoreLocation
CertStoreLocation
(enumeration)
StoreName
CertStoreName
(enumeration)
Note: The distinguished subject name of a certificate that you can specify for the SubjectName property is a commaseparated textual representation of the certificate details in the format "E=mailAddress, CN=commonName,
OU=orgUnit, O=organization, L=locality, S=stateOrProvince,C=countryCode". Determine the distinguished subject
name by double-clicking the certificate you want to use in the Certificate Manager (accessible from the Content tab of the
Internet Explorer Internet Options dialog box), switching to the Details tab, and selecting Subject in the Field column of
the list view on the Details tab.
PowerBuilder .NET Features Guide
97
TcpTransportSecurity Class
The TcpTransportSecurity class provides properties to control authentication parameters and the protection level for TCP
transport. Use it, instead of the HttpTransportSecurity class, to set the transport-level security for Web service bindings
that use TCP for message delivery.
Properties
TcpTransportSecurity
property
Type
Description
ClientCredentialType
TcpClientCredentialType
(enumeration)
ProtectionLevel
ProtectionLevel (enumeration) Gets or sets the protection level for the TCP stream.
Values are: NONE, SIGN, and ENCRYPTANDSIGN
(default).
UserNameCredential Class
The UserNameCredential class provides a user name, password, and domain name that enable you to authenticate a client
to a Web service or proxy server.
Invoke objects of the UserNameCredential class from the UserName property of WCFClientCredential,
HTTPDigestCredential, or WindowsCredential class objects.
Properties
UserNameCredential property
Type
Description
UserName
string
Password
string
Specifies a password
Domain
string
WCFBasicHttpBinding Class
Use the WCFBasicHttpBinding class for communication between a WCF client and ASMX-based Web services or other
services that conform to the WS-I Basic Profile 1.1.
Properties
98
WCFBasicHttpBinding
property
Type
Description
TransferMode
WSTransferMode(enumeration)
MessageEncoding
WSMessageEncoding
(enumeration)
Type
Description
TextEncoding
WSTextEncoding (enumeration)
Security
BasicHttpSecurity (class)
ReaderQuotas
WCFReaderQuotas (class)
WCFClientCredential Class
The WCFClientCredential class provides client credentials for a Web service or a proxy server that is behind a firewall.
Properties
WCFClientCredential
property
Type
Description
UserName
UserNameCredential (class)
HTTPDigest
HttpDigestCredential (class)
Windows
WindowsCredential (class)
ClientCertificate
ClientCertificateCredential
(class)
ServiceCertificate
ServiceCertificateCredential
(class)
WCFConnection Class
The WCFConnection class specifies the properties required for a WCF client to connect to a Web service.
WCFConnection is the base class for the WCFConnection object generated by the WCF Client project wizard.
Properties
WCFConnection property
Type
Description
BindingType
WCFBindingType (enumeration)
99
Type
Description
WSFederationHttpBinding,
WS2007FederationHttpBinding,
NetTcPBinding,
NetNamedPipeBinding,
NetMsmqBinding, and
WebHttpBinding.
WCF connection bindings are described on the
MSDN Web site.
ClientCredential
WCFClientCredential (class)
EndpointAddress
WCFEndpointAddress (class)
ProxyServer
WCFProxyServer (class)
Timeout
String
100
BasicHttpBinding
WCFBasicHttpBinding (class)
wsHttpBinding
WCFwsHttpBinding (class)
NetTcpBinding
WCFNetTcpBinding (class)
WebHttpBinding
WCFWebHttpBinding (class)
ws2007HttpBinding
WCFws2007HttpBinding (class)
Type
Description
wsFederationHttpBinding
WCFwsFederationHttpBinding
(class)
NetMSMQBinding
WCFNetMSMQBinding (class)
The following binding types are not supported: WSDualHttpBinding, NetPeerBinding, and
MsmqIntegrationBinding.
WCFEndpointAddress Class
The WCFEndpointAddress class provides a unique network address that a client uses to communicate with a service
endpoint.
Properties
WCFEndpointAddress property Type
Description
URL
string
Identity
WCFEndpointIdentity Class
The WCFEndpointIdentity class defines the identity type and value of an endpoint, enabling authentication by clients
exchanging messages with it.
Properties
WCFEndpointIdentity
property
Type
Description
Type
WCFEndpointIdentityType
(enumeration)
IdentityValue
string
101
WCFnetTCPBinding Class
The WCFnetTCPBinding class enables you to communicate with WCF Web services from a WCF client using
NetTcpBinding. This binding is intended for WCF-to-WCF communication only.
Properties
WCFnetTCPBinding
property
Type
Description
MaxConnections
System.Int32
ReliableSession
WCFReliableSession
(class)
Specifies whether to enable reliable sessions (using the WSReliableMessaging protocol) and defines settings for these
sessions when enabled.
TransactionFlow
boolean
true supported.
false (default) not supported.
TransactionProtocol
TransactionProtocolType
(enumeration)
TransferMode
WSTransferMode
(enumeration)
Security
NetTcpSecurity (class)
ReaderQuotas
WCFReaderQuotas (class) Gets or sets processing constraints based on the SOAP message
complexity for endpoints with this binding type.
WCFProxyServer Class
If you connect to a Web service from behind a proxy server, you must first instantiate an object of the WCFProxyServer
class. This class provides credential information to the proxy server.
Properties
102
WCFProxyServer
property
Type
Description
ProxyAddress
string
CredentialType
HttpProxyCredentialType
(enumeration)
ClientCredential
WCFClientCredential (class)
Type
Description
UseDefaultWebProxy
Boolean
WCFReaderQuotas Class
The WCFReaderQuotas class defines restrictions (quotas) for the complexity of message exchanges with service
endpoints that you can set differently according to the binding type used.
Properties
WCFReaderQuotas
property
Type
Description
MaxDepth
Int (System.Int32) Gets or sets a maximum node depth. The default value is 32.
MaxStringContentLength
Int (System.Int32) Gets or sets a maximum length for message strings returned
from the service. The default value is 8192.
MaxArrayLength
Int (System.Int32) Gets or sets the maximum length for arrays returned from the
service. The default value is 16384.
MaxBytesPerRead
Int (System.Int32) Gets or sets the maximum number of bytes returned from the
service during a single call. The default value is 4096.
MaxNameTableCharCount
WCFReliableSession Class
The WCFReliableSession class allows you to use reliable messaging for your Web service connections, as long as the
binding type you are using supports the WS-ReliableMessaging protocol. WCFReliableSession also lets you get and set
message ordering and duration.
Properties
WCFReliableSession
property
Type
Description
Enabled
boolean Specifies whether the connection uses the WS-ReliableMessaging protocol. The
default for this property depends on the binding type used for the Web service
connection. Values are:
Ordered
boolean Specifies whether messages are delivered in the order they are sent. Values are:
Duration
long
103
WCFWebHttpBinding Class
The WCFWebHttpBinding class enables you to communicate with WCF Web services through HTTP requests using
Plain Old XML (POX) messaging instead of SOAP messaging. This binding is intended only for WCF-to-WCF
communication.
Properties
WCFWebHttpBinding
property
Type
Description
TransferMode
WSTransferMode
(enumeration)
WriteEncoding
WSTextEncoding
(enumeration)
Gets or set the character encoding used for the message text.
Values are: ASCII, BIGENDIANUNICODE, UNICODE,
UTF32, UTF7, and UTF8 (default).
Security
WebHttpSecurity
(class)
ReaderQuotas
ReaderQuotas (class)
WCFwsHttpBinding Class
The WCFwsHttpBinding class enables you to communicate with Web services using the WSHttpBinding binding. This
binding provides transaction capability, reliable messaging, WS-Addressing, and message security.
Properties
WCFwsHttpBinding
property
Type
Description
MessageEncoding
TextEncoding
WSTextEncoding (class)
ReliableSession
WCFReliableSession (class)
TransactionFlow
boolean
Security
104
wsHttpSecurity (class)
true supported.
false (default) not supported.
Type
Description
ReaderQuotas
WCFReaderQuotas (class)
WebHttpSecurity Class
The WebHttpSecurity class provides the security settings for the WebHttpBinding of a WCF client to a WCF Web
service.
Properties
WebHttpSecurity
property
Type
Description
SecurityMode
WebHttpSecurityMode
(enumeration)
Transport
HttpTransportSecurity
(class)
WindowsCredential Class
The WindowsCredential class provides credential information that allows a WCF client to use a proxy server or connect
to a Web service that requires integrated Windows authentication.
The WindowsCredential class can be invoked by the Windows property of the WCFClientCredential class.
Properties
WindowsCredential
property
Type
Description
UserName
UserNameCredential
(class)
AllowsImpersonationLevel
ImpersonationLevel
(enumeration)
AllowNtlm
boolean
wsHttpSecurity Class
The wsHttpSecurity class provides the security settings for the wsHttpBinding of a WCF client to a Web service.
105
Type
Description
SecurityMode
wsSecurityMode (enumeration)
Gets or sets the security mode for the binding. Values are:
None, Transport, Message (default), and
TransportWithMessageCredential.
Transport
HttpTransportSecurity (class)
Message
NoDualHttpMessageSecurity
(class)
BasicHttpMessageCredentialType Enumeration
The BasicHttpMessageCredentialType enumeration specifies the credential type required by a binding for authentication.
It is used only for BasicHttpBinding bindings.
Enumerated values
BasicHttpMessageCredentialType value
Meaning
UserName
Certificate
BasicHttpSecurityMode Enumeration
The BasicHttpSecurityMode enumeration stores or supplies security mode settings for a WCF client using
BasicHttpBinding to bind to a Web service.
Enumerated values
BasicHttpSecurityMode value
Meaning
None
The SOAP message is not secured during transfer. This is the default behavior for
WCF client binding.
Transport
HTTPS provides security for the SOAP message and the client authenticates the
service using the service's SSL certificate. The ClientCredentialType property of
the BasicHttpBinding class controls client authentication to the service.
Message
SOAP message security provides client authentication. The server SSL certificate
must be provided to the client separately.
TransportWithMessageCredential HTTPS provides for message integrity, confidentiality, and server authentication.
SOAP message security assures client authentication. The service must be
configured with an SSL certificate.
106
Meaning
TransportCredentialOnly
CertStoreLocation Enumeration
The CertStoreLocation enumeration specifies the location of the X.509 certificate store containing a certificate you want
to use for secure communication from a WCF client.
Enumerated values
CertStoreLocation value
Meaning
CurrentUser
LocalMachine
CertStoreName Enumeration
The CertStoreName enumeration specifies the name of the X.509 certificate store containing a certificate you want to use
for secure communication from a WCF client.
Enumerated values
CertStoreName value
Meaning
AddressBook
AuthRoot
CertificateAuthority
Disallowed
My
Root
TrustedPeople
Specifies the X.509 certificate store for directly trusted people and resources
TrustedPublisher
HttpClientCredentialType Enumeration
The HttpClientCredentialType enumeration provides the type of credential to use for transport-level security when
connecting to a Web service that uses the BasicHttpBinding binding.
Enumerated values
HttpClientCredentialType value
Meaning
None
Basic
Digest
107
Meaning
NTLM
Windows
Certificate
HttpProxyCredentialType Enumeration
The HttpProxyCredentialType enumeration provides the type of credential required by a proxy server for clients that
connect to a Web service from behind a firewall.
Enumerated values
HttpProxyCredentialType value Meaning
None
Basic
Digest
NTLM
Client uses NTLM (NT LAN Manager) authentication to connect to the proxy
server
Windows
ImpersonationLevel Enumeration
The ImpersonationLevel enumeration supplies identification values to a proxy server or a Web service for a WCF client
using integrated Windows or digest authentication.
Enumerated values
ImpersonationLevel value Meaning
None
Anonymous
The server process cannot impersonate the client and cannot obtain identification
information about the client.
Identification
The server process cannot impersonate the client, but can obtain identification and
privileges information about the client. This allows other services available on the server
to use the client security context for access and validation decisions.
Impersonation
The server process can impersonate the client security context on its local system, but not
on remote systems.
Delegation
The server process can impersonate the client security context on local and remote
systems.
MessageCredentialType Enumeration
The MessageCredentialType enumeration specifies the credential type required by a binding for authentication. It is used
by all standard binding types except BasicHttpBinding.
108
Meaning
None
Windows
UserName
Certificate
IssuedToken
ProtectionLevel Enumeration
The ProtectionLevel enumeration provides the security service requested for an authenticated stream. This enumeration
is used by the TcpTransportSecurity class for NetTcpBinding bindings.
Enumerated values
ProtectionLevel value
Meaning
None
Sign
EncryptAndSign
Encrypts and signs data to ensure confidentiality and integrity of transmitted data
TcpClientCredentialType Enumeration
The TcpClientCredentialType enumeration provides the type of credential to use for transport-level security when
connecting to a Web service that uses the NetTcpBinding binding.
Enumerated values
TcpClientCredentialType value
Meaning
None
Windows
Certificate
WCFBindingType Enumeration
The WCFBindingType enumeration defines the binding and communication formats to use when accessing a WCF
service.
Enumerated values
WCFBindingType value
Description
BasicHttpBinding
109
Description
wsHttpBinding
ws2007HttpBinding
Binding that derives from the wsHttpBinding, but adds support for updated versions
of the ReliableSession, Security, and TransactionFlow binding elements.
wsFederationHttpBinding
Binding that supports the WS-Federation protocol for securely sharing resources by
participants in a federation.
ws2007FederationHttpBinding Binding that derives from the ws2007HttpBinding, but that also supports federated
security.
NetTcpBinding
NetNamedPipeBinding
Binding that is similar to the NetTcpBinding binding, but only supports on-machine
communication. Uses named pipes for message delivery and binary message
encoding.
NetMsmqBinding
Suitable for WCF clients and services that communicate with Microsoft Message
Queuing (MSMQ) endpoints. By default uses MSMQ transport security.
WebHttpBinding
Suitable for communication with services over the Web. Uses HTTP for transport, and
supports text/XML and JavaScript Object Notation (JSON) message encodings.
The following binding types are not currently supported in PowerBuilder WCF client applications: NetPeerTcpBinding,
MsmqIntegrationBinding, BasicHttpContextBinding, NetTcpContextBinding, and WSHttpContextBinding.
WCFEndpointIdentity Enumeration
The WCFEndpointIdentity enumeration defines the identity to use with an endpoint for authentication.
Enumerated values
WCFEndpointIdentity
value
Meaning
None
No identity is needed.
UPN
User Principal Name (UPN) is an identity that is used with the SSPINegotiate
authentication mode. The value for a UPN identity takes the format of an e-mail address,
with a user account name, and a name that identifies the domain of the user separated by
an arrobas (@) character. For example, [email protected].
SPN
Service Principal Name (SPN) is a name by which a client uniquely identifies a service
instance. You can use this identity type with three different authentication modes:
SSPINegotiate, Kerberos, and KerberosOverTransport.
The value for a UPN identity takes the format of an e-mail address, with a user account
name, and a name that identifies the domain of the user separated by an arrobas (@)
character. For example, [email protected].
DNS
110
Domain Name System (DNS) specifies the expected identity of the server. The identity
value is a domain name, such as Sybase.com.
Meaning
RSA
RSA is a public key encryption algorithm for signing and encrypting messages. It also
requires a private key for decrypting messages. For an RSA identity, you must specify the
public key for the identity value.
CERTIFICATE
Use the Certificate identity when a certificate is required for authentication to the service
endpoint. For the identity value, you must specify a Base64 encoded string representing
the raw data of the certificate.
WebHttpSecurityMode Enumeration
The WebHttpSecurityMode enumeration defines security mode settings for a WCF client using WebHttpBinding to bind
to a Web service.
Enumerated values
WebHttpSecurityMode value
Meaning
None
Transport
TransportCredentialOnly
wsSecurityMode Enumeration
The wsSecurityMode enumeration defines security mode settings for a WCF client using wsHttpBinding to bind to a Web
service.
Enumerated values
wsSecurityMode value
Meaning
None
Security is disabled
Transport
Message
TransportWithMessageCredential Transport security provides integrity and confidentiality, and SOAP message
security provides client authentication
WSTransferMode Enumeration
Use the WSTransferMode enumeration to get or set a value indicating whether SOAP request and response messages are
buffered or streamed .
Enumerated values
WSTransferMode value
Meaning
Buffered
Streamed
111
112
WSTransferMode value
Meaning
StreamedRequest
StreamedResponse
Index
Index
A
accelerator characters 46
accelerator keys
assigning to menu items 26
adding
XML comments 62
Adobe Flash 4
advantages of WPF applications 4
Alt key
and menu items 26
applications
MDI 18
architecture 1
area graphs
about 64
making three-dimensional 68
arrays
jagged 50
returning in function or event 50
runtime bounds creation 50
System.Array type 50
B
bands
in DataWindow painter 77
bar graphs
about 64
making three-dimensional 68
BasicHttpMessageCredentialType enumeration 106
BasicHttpMessageSecurity class 93
BasicHttpSecurity class 94
BasicHttpSecurityMode enumeration 106
BitLeft operators 51
BitRight operators 51
BMP files
adding to DataWindow objects 81
bubble graphs 65
BubbleSize property 67
Build Action property 15
buttons
adding to DataWindow objects 84
C
CertStoreLocation enumeration 107
CertStoreName enumeration 107
ClientCertificateCredential class 94
CLS (Common Language Specification) 49
CLS and .NET component projects 62
code snippets 44
column graphs
about 64
columns
adding to DataWindow objects 80
named in DataWindow painter 78
selecting in Select painter 75
Common Language Specification
See CLS
computed columns versus computed fields 82
computed fields
adding to DataWindow objects 81
defining custom buttons for 83
computed fields versus computed columns 82
conditional compilation 6
cone graphs 69
constructors
parameterized 60
continuous data, graphing 64
controls in DataWindow objects
adding 79
controls in windows
adding to window 18
creating
custom attributes 61
enumerations 58, 59
interfaces 52
WCF Client Proxy projects 41
custom attributes
creating 61
PowerScript syntax for 61
custom controls
about 29
adding to Toolbox 30
in DataWindow objects 31
WinForm, adding to window objects 30
WPF, adding to window objects 30
D
data entry forms 72
data source
SQL Select 74
database
tracing connections 88
Database painter 87
previewing data 87
database profiles 87
databases
accessing through SQL Select 74
retrieving, presenting, and manipulating data 87
DataWindow objects
about 71
adding controls 79
buttons, adding 84
columns, adding 80
computed fields, adding 81
custom buttons that add computed fields 83
drawing controls, adding 80
graphs, adding 86
group boxes, adding 81
Group style 73
multiple column 72
nesting reports 86
presentation styles 71
text, adding 80
113
Index
Treeview style 73
using 71
DataWindow painter
working in 77
declaring
namespaces 59
defaults
menu item names 23
delegates
consuming 54
syntax example 55
deployment requirements
.NET component targets 33
WPF Application targets 4
descendent menus
building 28
detail bands
in DataWindow painter 78
DirectX 4
DISTINCT keyword 74
donut graphs
about 64
making three-dimensional 68
drawing controls, adding to DataWindow objects 80
drop-down menus
deleting menu items 25
DSI Database Trace tool 88
E
Enumeration painter 16
enumerations
BasicHttpMessageCredentialType 106
BasicHttpSecurityMode 106
CertStoreLocation 107
CertStoreName 107
creating 58, 59
HttpClientCredentialType 107
HttpProxyCredentialType 108
ImpersonationLevel 108
MessageCredentialType 108
ProtectionLevel 109
syntax 58
TcpClientCredentialType 109
WCFBindingType 109
WCFEndpointIdentity 110
WebHttpSecurityMode 111
wsSecurityMode 111
WSTransferMode 111
errors
compile 45
event sequence 5
events 60
F
footer bands, in DataWindow painter 79
Freeform style
of DataWindow objects 72
G
GAC (Global Assembly Cache) 4
114
generic classes
syntax for consuming 56
GIF files, adding to DataWindow objects 81
global
enumerations 58
Global Assembly Cache
See GAC
Graph functions
SetBubbleSize 66
graphic user interface
See GUI
graphics, adding to DataWindow objects 81
graphs
about 63
adding to DataWindow objects 86
parts of 63
types of 64
Grid style
detail band in 78
of DataWindow objects 72
group box, adding to DataWindow objects 81
GUI (graphic user interface) 7
H
header bands, in DataWindow painter 78
headings
in DataWindow objects 78
Help
Visual Studio shell features 7
HttpClientCredentialType enumeration 107
HttpDigestCredential class 95
HttpProxyCredentialType enumeration 108
HttpTransportSecurity class 95
hyphens (-) 24
I
IDataWindowBase system interface 52
IDataWindowChild system interface 52
IDataWindowControl system interface 52
IDataWindowStore system interface 52
ImpersonationLevel enumeration 108
inheritance
building menus with 28
inheriting from .NET classes 57
instances, menu 29
IntelliSense
using 44
Interface Painter 16
interfaces
creating 16, 52
implementing 53
IPicture system interface 52
items
adding to menus 24
J
jagged arrays 50
JPEG files
Index
K
keyboard
using with menus 26
N
L
Label style
DataWindow objects 72
detail band in 78
labels
mailing 72
line drawing controls 80
line graphs
about 64
making three-dimensional 68
lines, in menus 24
local
enumerations 59
M
mailing labels 72
MDI applications
building 18
using menus 19
using sheets 19
MDI frames
adding toolbars to 26
opening sheets 19
MDI sheets
opening 19
using menus with 19
MDI windows 5
menu bars
about 19
adding to windows 28
deleting items 25
menu items
about 19
deleting 25
inserting 23
navigating in 25
properties 25
renaming 25
writing scripts for 28
Menu painter
opening 23
saving menus 25
workspace 20
menus
about 19
creating by inheriting 28
creating new 23
creating separation lines 24
deleting menu items 25
in MDI applications 19
navigating in 25
saving 25
N-Up style
detail band in 78
of DataWindow objects 72
names
of menu items 28
names, of columns in DataWindow painter 78
namespaces
declaring 59
navigating in a menu 25
.NET classes
inheriting from 57
syntax for inheriting from 57
.NET component target types 33
.NET delegates
consuming 54
syntax example 55
NetTcpSecurity class 96
New dialog 14
New dialog box
creating a menu 23
creating a window 17
NoDualHttpMessageSecurity class 96
NOT_IN_BETA1 59
O
opening
Menu painter 23
Select painter 74
Window painter 17
OpenSheet function 19
operators
bitwise 51
oval drawing controls 80
P
painters in PowerBuilder .NET 16
parameterized constructors 60
PB Obect Outline 12
PBDefault skin 15
PBWPF preprocessor symbol 6
periodic data, in DataWindow objects 72
pictures
adding to DataWindow objects 81
pictures, adding 81
pie graphs
about 64
making three-dimensional 68
PNG files
adding to DataWindow objects 81
polymorphism 52
pop-up menus
115
Index
Q
queries
saving 76
R
radar graphs 68
rectangle drawing controls 80
reports
Cascading style 73
Composite style 73
Crosstab style 73
Group style 73
presentation styles 71
requirements
.NET component deployment 33
runtime 4
rich text 73
RLE files
adding to DataWindow objects 81
RoundRectangle drawing controls 80
RTF 73
runtime class library 2
runtime requirements 4
S
saving
menus 25
queries 76
scatter graphs 65
Script view 43
scripts
for menu items 28
Select painter
opening 74
selecting tables 74
selecting for SQL select 74
semantic differences 3
separation lines, in menus 24
ServiceCertificateCredential class 97
shortcut keys
assigning to menu items 26
Skin property 15
116
skins 15
SQL Select
selecting columns 75
selecting tables 74
using as data source 74
SQL statements
generating through SQL Select 74
stacked graphs 69
StringBuilder system class 60
style
of windows 17
summary bands, in DataWindow painter 79
symbols for preprocessing 6
system interfaces 52
System Tree 8
System.Object
inheritance from 60
T
tables
presenting in Freeform style 72
presenting in Grid style 72
presenting in Label style 72
presenting in N-Up style 72
presenting in Tabular style 72
Tabular style
detail band in 78
of reports 72
target types 1, 33
TcpClientCredentialType enumeration 109
TcpTransportSecurity class 98
text
in DataWindow objects 80
of menu items 25
third-party controls
about 29
adding to Toolbox 30
in DataWindow objects 31
WinForm, adding to window objects 30
WPF, adding to window objects 30
three-dimensional graphs
about 68
toolbars
in MDI applications 26
Toolbox 10
tooltips, adding to a DataWindow object 86
tracing database connections 88
U
underline(_) character
in menu items 26
unsupported features in WPF applications 5
user objects
about 29
custom 29
third-party 29
user-defined enumerations 58, 59
UserNameCredential class 98
Index
V
visual controls 9
Visual Studio 3
W
WCF (Windows Communication Foundation) 40
WCF Client
connection classes 93
WCF Client Proxy projects
creating 41
overview 40
WCFBasicHttpBinding class 98
WCFBindingType enumeration 109
WCFClientCredential class 99
WCFConnection class 99
WCFConnection object 91
WCFEndpointAddress class 101
WCFEndpointIdentity class 101
WCFEndpointIdentity enumeration 110
WCFnetTCPBinding class 102
WCFProxyServer class 102
WCFReaderQuotas class 103
WCFReliableSession class 103
WCFWebHttpBinding class 104
WCFwsHttpBinding class 104
X
XAML editor 7
XML comments 62
117
Index
118