Navigation: Ultimate Suite for PowerBuilder Help > Datawindow Controls >

Profile Picture from File

Send comments on this topic.

 

Profile Picture - From File

Display an image in a variety of frames.

Function Parameters

f_pbus_profilepicture (unsignedlong ahdc, long ax, long ay, long awidth, long aheight, string aimage, integer aframethickness, string aframetype, string atheme)
 

Argument

 Description

 ahdc

 Always pass GetPaintDC() in the DW Expression

 ax

 Always pass GetPaintRectX() in the DW Expression

 ay

 Always pass GetPaintRectY() in the DW Expression

 awidth

 Always pass GetPaintRectWidh() in the DW Expression

 aheight

 Always pass GetPaintRectHeight() in the DW Expression

 aimage

 The file name of the image to display

 aframethickness

 The pixel width of the picture frame.

 aframetype

 The shape of the picture frame. Valid values are "CIRCLE", "SQUARE", "ROUNDEDSQUARE"

 atheme

 Pass, as a string, the color of the picture frame. Valid values are "BLUE", "OLIVE", "SILVER", "BLACK", "CLASSIC", "PINK", "DEEPBLUE", "PURPLE", "GREEN", "ORANGE", "RED"

Implementation

This control is rendered in a computed field on your dataobject. Start by adding a computed field to your datawindow and give it the width and height that you want. Add an expression to the computed field that will look like this:

//Example 1 - Display image from image file

Paint
(
    if (f_pbus_profilepicture(GetPaintDC(),
                                       GetPaintRectX(),
                                       GetPaintRectY(),
                                       GetPaintRectWidth(),
                                       GetPaintRectHeight(),
                                       "C:/empimages/1011.png" ,
                                       2,
                                       "CIRCLE",
                                       "BLUE"),

          "", "Error")
)

For the image file name, you can use a column, computed field, or hard coded value.

Previewing Your Profile Picture

The profile picture control will not render in the painter portion of the datawindow painter. It will display in the preview section of the datawindow painter. To see the control in design time, open the preview panel in the datawindow painter and retrieve a row.

 


Copyright © 2021 Werysoft Inc.