Specifying application properties – PB Docs 70

Specifying application properties

You specify application properties in the Application painter’s
Properties view.

proc.gif To specify application properties:

  1. In the Application painter, if the Properties
    view is not open, select View>Properties from the menu
    bar.

    Ap13.gif

    With the exception of the AppName property, the properties
    on the General and Toolbar tab pages can be modified in the Properties
    view and in scripts.

    If you need help specifying properties in the Properties View,
    right-click on the property sheet background and select Help from
    the popup menu.

  2. Select the General or Toolbar tab page

    or

    On the General tab page, click the Additional Properties
    button to display the Application property sheet.

    Ap14.gif

    The properties on the Application property sheet can only
    be modified in the Properties view. They can’t be modified
    in scripts.

  3. Specify the properties:

    To specify this Use this tab page
    Display name General tab page
    Application has toolbar text and toolbar
    tips
    Toolbar tab page
    Default font for static text as it appears
    in windows, user objects, and DataWindow objects
    Additional Properties (Text Font)
    Default font for data retrieved in a
    DataWindow object
    Additional Properties (Column Font)
    Default font for column headers in tabular
    and grid DataWindow objects
    Additional Properties (Header Font)
    Default font for column labels in freeform DataWindow
    objects
    Additional Properties (Label Font)
    Application icon Additional Properties (Icon)
    Global objects for the application Additional Properties (Variable Types)

These sections have information about how you specify the
following application properties in the Application painter:

Specifying default textproperties

You probably want to establish a standard look for text that
is in your application. There are four kinds of text whose properties
you can specify in the Application painter: text, header, column,
and label.

PowerBuilder provides default settings for the font, size, and
style for each of these and a default color for text and the background.
You can change these settings for an application in the Application
painter and can override the settings for a window, user object,
or DataWindow object.

note.gif Properties set in the Database painter override application
properties
If extended attributes have been set for a database column
in the Database painter or Table painter, those font specifications
override the fonts specified in the Application painter.

proc.gif To change the text defaults for an application:

  1. In the Properties view, click Additional
    Properties and select one of the following:

    • Text Font tab
    • Header Font tab
    • Column Font tab
    • Label Font tab

    The tab you choose displays the current settings for the font,
    size, style, and color.

    ap7.gif

    The text in the Sample box illustrates text with the current
    settings.

  2. Review the settings and make any necessary changes:

    • To change the font,
      select a font from the list in the Font listbox.
    • To change the size, select a size from the list
      in the Size listbox or type a valid size in the listbox.
    • To change the style, select a style (Regular, Italic,
      Bold, or Bold Italic) from the Font styles listbox.
    • To change font effects, select one or more from
      the Effects group box (Strikeout and Underline).
    • To change the text color, select a color from the
      Text Color listbox. (You don’t specify colors for data,
      headings, and labels here. You do that in the DataWindow painter.)
    • To change the background color, select a color from
      the Background listbox.

    note.gif Using custom colors When specifying a text color, you can choose a custom color.
    You can define custom colors in several painters, including the
    Window painter or DataWindow painter.

  3. When you have made all the changes, click OK.

Specifying an icon

Users can minimize your application during execution. If you
specify an icon in the application painter, the icon will display
when the application is minimized.

note.gif On UNIX The icon that you specify does not display when you run your
application on UNIX platforms. If you are creating a cross-platform
application, you can select an ICO file that will be used when you
build your application on Windows.

proc.gif To associate an icon with an application:

  1. In the Properties view, click Additional
    Properties and select the Icon tab.

  2. Specify a file containing an icon (an ICO file).

    The button displays below the Browse button.

  3. Click OK to associate the icon with the application.

Specifying default globalobjects

PowerBuilder provides five built-in global objects that are
predefined in all applications.

Global object Description
SQLCA Transaction object, used to communicate
with your database
SQLDA DynamicDescriptionArea, used in dynamic
SQL
SQLSA DynamicStagingArea, used in dynamic SQL
Error Used to report errors during execution
Message Used to process messages that are not PowerBuilder-defined events
and pass parameters between windows

You can create your own versions of these objects by creating
a standard class user object inherited from one of the built-in
global objects. You can add instance variables and functions to
enhance the behavior of the global objects.

For more information, see Chapter 12, “Working with User Objects “.

After you do this, you can tell PowerBuilder that you want to
use your version of the object in your application as the default,
instead of the built-in version.

proc.gif To specify the default global objects:

  1. In the Properties view, click Additional
    Properties and select the Variable Types tab.

    The Variable Types property page displays.

  2. Specify the standard class user object you defined
    in the corresponding field.

    For example, if you defined a user object named mytrans that
    is inherited from the built-in Transaction object, type mytrans in
    the box corresponding to SQLCA.

    ap9.gif

  3. Click OK.

When you run your application, it will use the specified standard
class user objects as the default objects instead of the built-in
global objects.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x