AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Propiedades WLanguage / Propiedades varias
  • Content of Static Text control
  • Equivalence
  • Caption associated with an Image control
  • Caption associated with a button
  • Limitations
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
In a database, the Caption property is used to:
  • Find out the caption associated with a file item.
    Note: The item may have been created using the data model editor or by programming.
  • Find out the caption associated with a data file.
    Note: The data file may have been created using the data model editor or by programming.
  • Find out and modify the connection caption. The connection can correspond to:
In a report, the Caption property is used to get and change the text:
  • a Static Text control field.
  • of a Link control.
  • of a Chart control.
In a window or page, the Caption property is also used to:
  • Find out and modify the caption of a control found in a window or in a page.
  • Find out and modify the caption of a menu option.
  • Find out and modify the title of a window or page.
Reminder: The initial label of a field, window, page or menu item is defined in the editor when the object is described.
Ejemplo
Reportes y Consultas
// Find out the caption associated with the Customer.Title item
ResCaption = Customer.Title.Caption
// Modify the text in the "STC_IntroControl" Static Text control
STC_IntroControl.Caption = "Hello" + Customer.FullName
// Equivalent to: LIB_ChampIntro.Label = "Dear Sir [%Customer.Name%]"
Sintaxis

Finding out the text of caption associated with an element Ocultar los detalles

<Result> = <Element used>.Caption
<Result>: Character string
Text displayed in the specified element.
<Element used>: Type of element
Name of the element to be used.

Modifying the text of caption associated with an element Ocultar los detalles

<Element used>.Caption = <New text>
<Element used>: Type of element
Name of element to use.
<New text>: Character string
New text displayed in the specified element.
Observaciones

Content of Static Text control

To retrieve the value of a control or the value of an item in a Static Text control:
  • Under the state editor: insert [%<Field Name>%] or [%<Section Name>%] directly into the field label.
  • In programming: two syntaxes are possible with the Caption property:
    • use directly the [%<Control name>%] or [%<Item name>%] string in the string that corresponds to the caption. For example:
      STC_IntroControl.Caption = "Hello [%Customer.FullName%]"
    • use the name of the control or the name of the item in the caption. For example:
      STC_IntroControl.Caption = "Hello" + Customer.FullName

Equivalence

The Caption and Value properties are equivalent.
To retrieve the text of a Static Text control, the following syntaxes are equivalent:
ResCaption = <Static Text control>.Caption

ResCaption = <Static Text control>.Value

ResCaption = <Static Text control>
To modify the text displayed in a Static Text control, the following syntaxes are equivalent:
<Name of Static Text control>.Caption = <New text>

<Name of Static Text control>.Value = <New text>

<Name of Static Text control> = <New text>
Reportes y Consultas

Caption associated with an Image control

The Caption property returns or replaces the current image with the image passed as parameter.
The Caption property has the same effect as assigning the name of the image to the control (Control = Image_Name).
The Image field has a label: the Caption property can be used to modify this label.. If the new caption does not correspond to a valid image, the caption of the Image control is modified.
Reportes y Consultas

Caption associated with a button

The Caption property can have two actions:
  • replace the image of the button (the name passed as parameter corresponds to an image file),
  • return or replace the button caption (the text passed as parameter is not an image file name).
For example:
// Modify the image of a graphic button
BTN_Button1.Caption = "Help.BMP"
 
// Modify the caption of a text button
BTN_Button1.Caption = "New caption"
Remark: If the indicated label contains the & character, the letter following the & character will be considered as the hotkey letter for the field.

Limitations

Reportes y Consultas In a report, the Caption property can only be used on "Static Text" and "Link" controls.
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

Última modificación: 05/12/2024

Señalar un error o enviar una sugerencia | Ayuda local