PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Inserting images
  • Image height (List Box or Combo Box control)
  • Image in the title of a column in a Table control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Builds a sequence of characters containing an image.
AndroidiPhone/iPadUniversal Windows 10 AppWindows Mobile This sequence of characters is used to insert an image:
  • in an element of a List Box or Combo Box control.
  • Windows Mobile in the title bar and/or status bar of a window.
  • in a Static control.
  • in a Text column found in a Table control.
The inserted image can be:
  • a standard image,
  • an image made of several drawings. This image will have been divided beforehand (by LoadImage or by LoadImageSheet).
Versions 22 and later
Stored procedures This function is now available in the code of stored procedures.
New in version 22
Stored procedures This function is now available in the code of stored procedures.
Stored procedures This function is now available in the code of stored procedures.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Android This function is now available for Android applications.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Android This function is now available for Android applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Android This function is now available for Android applications.
Example
// Add an image to the title of a column in a Table control
TABLE_MyTable.COL_MyColumn..Title = gImage("MyImage.BMP") + "My title"
Syntax

Inserting a standard image Hide the details

<Result> = gImage(<Image name>)
<Result>: Character string
Sequence of characters in the following format: <Image identifier>, <Drawing rank>.
Windows Mobile This sequence of characters can be:
  • used in ListAdd, ListInsert or ListModify.
  • assigned to a Static control.
  • used in the title bar or status bar of a window.
  • used in a Text column found in a Table control.
<Image name>: Character string
  • Name and full (or relative) path of the image to insert. A UNC path can be used.
    Windows Mobile Name and full path of the image to insert.
  • Name of Image control containing the image to insert.
Versions 25 and later

Inserting an image contained in an Image variable Hide the details

<Result> = gImage(<Image> [, <Mode>])
<Result>: Character string
Sequence of characters in the following format: <Image identifier>, <Drawing rank>.
Windows Mobile This sequence of characters can be:
  • used in ListAdd, ListInsert or ListModify.
  • assigned to a Static control.
  • used in the title bar or status bar of a window.
  • used in a Text column found in a Table control.
<Image>: Image variable
Name of the Image variable to insert.
<Mode>: Optional Integer constant
Image display mode:
imgCenteredCentered: Image centered in the control.
imgStretchedStretched: Image stretched across the entire surface of control.
imgHCHomothetic centered: Image enlarged or reduced (while respecting the proportions of initial image) to occupy the entire surface of control and centered in the control.
imgHEHomothetic extended: Image enlarged or reduced (while respecting the proportions of initial image) so that the smaller side of image is entirely displayed in the control.
imgHCEHomothetic centered extended: Image enlarged or reduced (while respecting the proportions of the initial image) in order for the smaller side of the image to be entirely displayed in the control and in order for the image to be centered in the control.
imgHWISHomothetic without enlargement: If the image can be entirely displayed in the control, it is displayed at 100%. Otherwise, the image is proportionally reduced in order to be entirely displayed.
imgHCWISHomothetic without enlargement: If the image can be entirely displayed in the control, it is displayed at 100% and centered in the control. Otherwise, the image is proportionally reduced in order to be entirely displayed and centered in the control.
imgNormal100%: Image displayed at 100% in the top left corner of control.
imgNoScaleIn "Large fonts" mode of Windows, the image displayed in an Image control is automatically zoomed.
The imgNoScale constant allows you not to zoom the image in "Large fonts" mode. This constant is useful for the controls where a drawing is performed on a bitmap image coming from a screen shot.
This constant must be combined with one of the constants used to define the display mode of image.
Universal Windows 10 App This constant is not available.
Android This parameter is not available.
New in version 25

Inserting an image contained in an Image variable Hide the details

<Result> = gImage(<Image> [, <Mode>])
<Result>: Character string
Sequence of characters in the following format: <Image identifier>, <Drawing rank>.
Windows Mobile This sequence of characters can be:
  • used in ListAdd, ListInsert or ListModify.
  • assigned to a Static control.
  • used in the title bar or status bar of a window.
  • used in a Text column found in a Table control.
<Image>: Image variable
Name of the Image variable to insert.
<Mode>: Optional Integer constant
Image display mode:
imgCenteredCentered: Image centered in the control.
imgStretchedStretched: Image stretched across the entire surface of control.
imgHCHomothetic centered: Image enlarged or reduced (while respecting the proportions of initial image) to occupy the entire surface of control and centered in the control.
imgHEHomothetic extended: Image enlarged or reduced (while respecting the proportions of initial image) so that the smaller side of image is entirely displayed in the control.
imgHCEHomothetic centered extended: Image enlarged or reduced (while respecting the proportions of the initial image) in order for the smaller side of the image to be entirely displayed in the control and in order for the image to be centered in the control.
imgHWISHomothetic without enlargement: If the image can be entirely displayed in the control, it is displayed at 100%. Otherwise, the image is proportionally reduced in order to be entirely displayed.
imgHCWISHomothetic without enlargement: If the image can be entirely displayed in the control, it is displayed at 100% and centered in the control. Otherwise, the image is proportionally reduced in order to be entirely displayed and centered in the control.
imgNormal100%: Image displayed at 100% in the top left corner of control.
imgNoScaleIn "Large fonts" mode of Windows, the image displayed in an Image control is automatically zoomed.
The imgNoScale constant allows you not to zoom the image in "Large fonts" mode. This constant is useful for the controls where a drawing is performed on a bitmap image coming from a screen shot.
This constant must be combined with one of the constants used to define the display mode of image.
Universal Windows 10 App This constant is not available.
Android This parameter is not available.

Inserting an image contained in an Image variable Hide the details

<Result> = gImage(<Image> [, <Mode>])
<Result>: Character string
Sequence of characters in the following format: <Image identifier>, <Drawing rank>.
Windows Mobile This sequence of characters can be:
  • used in ListAdd, ListInsert or ListModify.
  • assigned to a Static control.
  • used in the title bar or status bar of a window.
  • used in a Text column found in a Table control.
<Image>: Image variable
Name of the Image variable to insert.
<Mode>: Optional Integer constant
Image display mode:
imgCenteredCentered: Image centered in the control.
imgStretchedStretched: Image stretched across the entire surface of control.
imgHCHomothetic centered: Image enlarged or reduced (while respecting the proportions of initial image) to occupy the entire surface of control and centered in the control.
imgHEHomothetic extended: Image enlarged or reduced (while respecting the proportions of initial image) so that the smaller side of image is entirely displayed in the control.
imgHCEHomothetic centered extended: Image enlarged or reduced (while respecting the proportions of the initial image) in order for the smaller side of the image to be entirely displayed in the control and in order for the image to be centered in the control.
imgHWISHomothetic without enlargement: If the image can be entirely displayed in the control, it is displayed at 100%. Otherwise, the image is proportionally reduced in order to be entirely displayed.
imgHCWISHomothetic without enlargement: If the image can be entirely displayed in the control, it is displayed at 100% and centered in the control. Otherwise, the image is proportionally reduced in order to be entirely displayed and centered in the control.
imgNormal100%: Image displayed at 100% in the top left corner of control.
imgNoScaleIn "Large fonts" mode of Windows, the image displayed in an Image control is automatically zoomed.
The imgNoScale constant allows you not to zoom the image in "Large fonts" mode. This constant is useful for the controls where a drawing is performed on a bitmap image coming from a screen shot.
This constant must be combined with one of the constants used to define the display mode of image.
Universal Windows 10 App This constant is not available.
Android This parameter is not available.
Remarks

Inserting images

  • gImage can be used to insert an image:
    • into the title and status bars of a window or into a Static control.
    • into a Table control. In this case, the image must be inserted into a text column.
  • To display a text over an image:
    • Insert an image with gImage,
    • Describe the background color of the text with gBackground and the Transparent constant,
    • Display the text.
      For example:
      ListAdd(LIST_ListView, gImage(ImagePath) + gBackground(Transparent) + gCoord(0, 0) + ...
      "Text")
  • Versions 17 and later
    If a row of a Combo Box control displays an image via gImage, when this row is selected, the image is re-used in the main row.
    New in version 17
    If a row of a Combo Box control displays an image via gImage, when this row is selected, the image is re-used in the main row.
    If a row of a Combo Box control displays an image via gImage, when this row is selected, the image is re-used in the main row.

Image height (List Box or Combo Box control)

The height of the image displayed in an element of a List Box or Combo Box control is truncated to the number of pixels specified when the control was created ("Style" tab of the control description).
Windows Mobile

Image in the title of a column in a Table control

..TitleImage is used to add an image to the title of a column in a Table control.
Business / UI classification : Neutral code
Component : wd250mdl.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment