Images can also be loaded through an URL address now (not only via a file path). Currently only URLs starting with http and https are supported.
However, not all project types support loading images via URL, only PowerClient- and PowerServer-deployed applications support it.
And not all objects/controls can load images via URL; only the objects/controls listed below can (those not listed below can still load images via file paths):
Object/Control |
Property/Function |
Usage |
---|---|---|
DataWindow object > Button control |
Filename property |
In a painter: In the control's Properties view > General page > Picture File field, enter the URL of the picture file. In scripts:
|
DataWindow object > Column control |
BitmapName property |
In a painter: In the control's Properties view > General tab, select the Display As Picture option and then enter the URL of picture file in the rows provided below. In scripts:
|
DataWindow object > Computed Field control |
Expression property |
In a painter: In the control's Properties view > General page > Compute Expression field, enter the Bitmap expression function and the URL of the picture file, for example, Bitmap("http://172.16.5.175/computed2.jpg") In
scripts: |
DataWindow object > Picture control |
Filename property |
In a painter: In the control's Properties view > General page > File Name field, enter the URL of the picture file. In scripts:
|
Picture control |
PictureName property |
In a painter: In the control's Properties view > General page > PictureName field, enter the URL of the picture file. In scripts: |
PictureButton control |
PictureName property |
In a painter: In the control's Properties view > General page > PictureName field, enter the URL of the picture file. In scripts: |
PictureHyperlink control |
PictureName property |
In a painter: In the control's Properties view > General page > PictureName field, enter the URL of the picture file. In scripts: |
PictureListBox control |
AddPicture (picturename) function |
In scripts: |
PictureName[ ] property |
In a painter: In the control's Properties view > Pictures tab > Picture Name field, enter the URL of the picture file. |
|
DropdownPictureListBox control |
AddPicture (picturename) function |
In scripts: |
PictureName[ ] property |
In a painter: In the control's Properties view > Pictures tab > Picture Name field, enter the URL of the picture file. |
|
Tab control > TabPage |
PictureName property |
In a painter: In the user object's Properties view > TabPage page > PictureName field, enter the URL of the picture file. In scripts:
|
Menu object > Submenu item |
MenuImage property |
In a painter: In the submenu item's Properties view > General page > MenuImage field, enter the URL of the picture file. In scripts:
|
ToolbarItemName and ToolbarItemDownName properties |
In a painter: In the submenu item's Properties view > Toolbar page > ToolbarItemName field and ToolbarItemDownName field, enter the URL of the picture file. In scripts:
|
|
ListView control |
LargePictureName property |
In a painter: In the ListView control's Properties view > Large Picture page > LargePictureName field, enter the URL of the picture file. |
AddLargePicture (picturename) function |
In scripts:
|
|
SmallPictureName property |
In a painter: In the ListView control's Properties view > Small Picture page > SmallPictureName field, enter the URL of the picture file. |
|
AddSmallPicture (picturename) function |
In scripts:
|
|
StatePictureName property |
In a painter: In the ListView control's Properties view > State page > StatePictureName field, enter the URL of the picture file. |
|
AddStatePicture (picturename) function |
In scripts:
|
|
TreeView control |
PictureName[ ] property |
In a painter: In the TreeView control's Properties view > Pictures page > PictureName field, enter the URL of the picture file. |
AddPicture (picturename) function |
In scripts:
|
|
StatePictureName property |
In a painter: In the TreeView control's Properties view > State page > StatePictureName field, enter the URL of the picture file. |
|
AddStatePicture (picturename) function |
In scripts:
|
You can get and set the following settings for pictures loaded via URL:
-
CloudAppSet -- Configures the following settings for pictures loaded via URL in PowerServer/PowerClient-deployed applications: 1) the picture cache directory, 2) whether to delete pictures from the cache when the application is closed, 3) whether to check picture for update. For more information, refer to CloudAppSet.
CloudAppSet ("picturecachepath", "/picturecache"); CloudAppSet ("clearpicturecacheonclose", "true"); CloudAppSet ("checkpictureforupdate", "true");
-
CloudAppGet -- Gets the following settings for pictures loaded via URL in PowerServer/PowerClient-deployed applications, 1) the picture cache directory, 2) whether to delete pictures from the cache when the application is closed, 3) whether to check picture for update. For more information, refer to CloudAppGet.
CloudAppGet ("picturecachepath", strValue1); CloudAppGet ("clearpicturecacheonclose", strValue2); CloudAppGet ("checkpictureforupdate", strValue3);
Note that
1) The retry interval for picture download is 30 seconds, and the retry times is 3.
2) If pictures cannot be downloaded successfully, a webpicture.log file will be generated in the "Log" folder of the current application directory.