PC SOFT

AYUDA EN LÍNEA
DE WINDEV, WEBDEV Y WINDEV MOBILE

  • Inserting images
  • Height of image (List Box or Combo Box control)
  • Image in the title of a table column
  • Component
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Otros
Procedimientos almacenados
gImage (Function)
 
Builds a sequence of characters containing an image.
WINDEVAndroidiPhone/iPadWindows MobileUniversal Windows 10 App This sequence of characters is used to insert an image:
  • in an element found in a List Box or Combo Box control.
  • WINDEVWindows 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).
Versiones 22 y posteriores
Procedimientos almacenados This function is now available in the code of stored procedures.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Código ServidorLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Código ServidorWindows This function is now available for the WEBDEV sites in Windows.
Nueva funcionalidad versión 22
Procedimientos almacenados This function is now available in the code of stored procedures.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Código ServidorLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Código ServidorWindows This function is now available for the WEBDEV sites in Windows.
Procedimientos almacenados This function is now available in the code of stored procedures.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Código ServidorLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Código ServidorWindows This function is now available for the WEBDEV sites in Windows.
Versiones 21 y posteriores
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
Nueva funcionalidad versión 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the 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 the iPhone/iPad applications.
Android This function is now available for the Android applications.
Ejemplo
WINDEVReportes y ConsultasCódigo de Usuario (UMC)
// Add the "C:\MyImages\Image.BMP" image into the "LIST_Customer" control
ListAdd(LIST_Customer, gImage("C:\MyImages\Image.BMP"))
// Add an image made of several drawings
// Split into 10 rows and 2 columns
// Load the "C:\MyImages\DecImage.BMP" image in memory
LoadImage(IDImage, "C:\MyImages\DecImage.BMP", 10, 2)
FOR DrawingRank = 1 TO 10*2
ListAdd(LIST_Customer, gImage(IDImage, DrawingRank))
END
Windows Mobile
// Add the "\MyImages\Image.BMP" image into the "LIST_Customer" control
ListAdd(LIST_Customer, gImage("\MyImages\Image.BMP"))
// Add an image made of several drawings
// Split into 10 rows and 2 columns
// Load the "\MyImages\DecImage.BMP" image in memory
LoadImage(IDImage, "\MyImages\DecImage.BMP", 10, 2)
FOR DrawingRank = 1 TO 10*2
ListAdd(LIST_Customer, gImage(IDImage, DrawingRank))
END
// Add an image into the title of a table column
TABLE_MyTable.COL_MyColumn..Title = gImage("MyImage.BMP") + "My title"
Sintaxis

Inserting a standard image Ocultar los detalles

<Result> = gImage(<Image Name>)
<Result>: Character string
Sequence of characters in the following format: <Image Identifier>, <Drawing Rank>.
WINDEVWindows 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.
WEBDEV - Código Servidor This sequence of characters is not interpreted by the controls in WEBDEV. This function can be used to format the string returned by a WEBDEV Webservice consumed by a WINDEV or WINDEV Mobile application.
<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.
WINDEVWEBDEV - Código ServidorCódigo de Usuario (UMC)

Inserting an image made of several drawings Ocultar los detalles

<Result> = gImage(<Image Identifier> , <Drawing Rank>)
<Result>: Character string
Sequence of characters in the following format: <Image Identifier>, <Drawing Rank>.
WINDEV 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.
WEBDEV - Código Servidor This sequence of characters is not interpreted by the controls in WEBDEV. This function can be used to format the string returned by a WEBDEV Webservice consumed by a WINDEV or WINDEV Mobile application.
<Image Identifier>: Integer
Identifier of the image (included between 1 and 9) corresponding to the identifier of the image divided and loaded in memory by LoadImage or LoadImageSheet.
<Drawing Rank>: Integer
Number of the drawing cut. The set of drawings constitutes the image. This number is included between 1 and the result of the multiplication performed between <Number of Columns> and <Number of Rows> used in LoadImage or LoadImageSheet.
Observaciones

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 associated with the Transparent constant,
    • Display the text.
      For example:
      ListAdd(LIST_ListView, gImage(ImagePath) + gBackground(Transparent) + gCoord(0, 0) + ...
      "Text")
  • Versiones 17 y posteriores
    If a row found in a Combo Box control displays an image via gImage, when this row is selected, the image is re-used in the main row.
    Nueva funcionalidad versión 17
    If a row found in 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 found in a Combo Box control displays an image via gImage, when this row is selected, the image is re-used in the main row.

Height of image (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 creating the control ("Style" tab of control description).
WINDEVWindows Mobile

Image in the title of a table column

..TitleImage is used to easily include an image in the title of a table column.

Component

Until version 21, gImage was available in the wdxxxobj component. From version 22, this function is now available in the wdxxxmdl component.
Componente : wd240mdl.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario