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 a window or with a page
  • Text of a Static, Edit, Combo Box, List Box or ListView control
  • Text of with a table column
  • Text of a Check Box or Radio Button control
  • Caption of a Check Box column in a Treeview Table control
  • Caption associated with an Image control
  • Caption associated with a button
  • Caption of a Tab control
  • Text of a Breadcrumb control
  • Menu management: Functions or properties?
  • 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.
  • WEBDEV - Código Servidor Get content of a Breadcrumb control.
Reminder: The initial label of a field, window, page or menu item is defined in the editor when the object is described.
Ejemplo
WINDEVWEBDEV - Código ServidorReportes y ConsultasAndroidWidget Android iPhone/iPadIOS WidgetJavaCódigo de Usuario (UMC)Ajax
// 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%]"
WINDEVAndroidWidget Android iPhone/iPadIOS WidgetJavaCódigo de Usuario (UMC)
// Change the button caption
IF WIN_Window1.Modified = True THEN
BTN_Add.Caption = "Save"
ELSE
BTN_Add.Caption = "Close"
END
Sintaxis
WINDEVWEBDEV - Código ServidorAndroidWidget Android iPhone/iPadIOS WidgetJavaCódigo de Usuario (UMC)Ajax

Finding out the caption associated with an item Ocultar los detalles

<Result> = <Data file>.<Item>.Caption
<Result>: Integer
Item caption.
<Data file>: Character string
Logical name of the data file used.
<Item>: Character string
Name of the item used.

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>
WINDEVWEBDEV - Código ServidorAndroidiPhone/iPadIOS WidgetJavaCódigo de Usuario (UMC)PHPAjax

Caption associated with a window or with a page

The caption associated with a window or with a page corresponds to the title of the window or to the title of the page. This title is returned by the Title property.
WINDEVWEBDEV - Código ServidorAndroidWidget Android iPhone/iPadIOS WidgetJavaCódigo de Usuario (UMC)PHPAjax

Text of a Static, Edit, Combo Box, List Box or ListView control

The control caption corresponds to the text of caption.
In a Static Text control, this text is returned by the Value property.
Widget Android This property is available for a Static Text control only.
WINDEVWEBDEV - Código ServidorAndroidiPhone/iPadIOS WidgetJavaCódigo de Usuario (UMC)Ajax

Text of with a table column

The text of a table column corresponds to the column title and is returned by the Title property.
WINDEVWEBDEV - Código ServidorAndroidiPhone/iPadIOS WidgetJavaCódigo de Usuario (UMC)Ajax

Text of a Check Box or Radio Button control

The Caption property is used to get and change:
  • the text of a Check Box or Radio Button control,
  • the text of an option in the Check Box or Radio Button control.
To modify the caption of an option found in a Check box or Radio Button control:
<Control name>[<Index>].Caption = <New caption>
For example:
RADIO_Radio_Button[2].Caption = "Option number 2"
To modify the caption associated with a Check box or Radio Button control:
<Control name>.Caption = <New caption>
For example:
RADIO_Radio_Button.Caption = "Age of participants"
To retrieve the caption of an option:
<Control>[Index].Caption
WINDEVCódigo de Usuario (UMC)

Caption of a Check Box column in a Treeview Table control

When used on a Check Box column in a TreeView Table control, the Caption property can be used to get and change the text displayed next to the check box.
WINDEVWEBDEV - Código ServidorReportes y ConsultasAndroidiPhone/iPadIOS WidgetJavaCódigo de Usuario (UMC)Ajax

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.
WINDEVWEBDEV - Código ServidorReportes y ConsultasAndroidWidget Android iPhone/iPadIOS WidgetJavaCódigo de Usuario (UMC)Ajax

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.
WINDEV Note: The label of a Button field may or may not be in RTF ("RTF" option checked in the "General" tab of the field description)..
  • The caption may contain RTF tags when it is retrieved. To get the caption without the RTF tags, use RTFToText. For example:
    MyCaption is string
    MyCaption = RTFToText(BTN_Button.Caption)
  • In edit mode, the text associated with the caption of the control can be in RTF text or not. The Button control will adapt automatically.
WEBDEV - Código Servidor The Caption property can only be used on Text buttons. To modify the image of a fixed-image button, you have the ability to use Image in browser code.
WINDEVJavaCódigo de Usuario (UMC)

Caption of a Tab control

The caption of a Tab control corresponds to the text of the button that is used to select the tab pane.
WEBDEV - Código ServidorAjax

Text of a Breadcrumb control

The Caption property is used to:
  • get and change the text used to identify an element in the breadcrumbs. This caption was defined:
    • in the page editor, in the control description.
    • when adding, inserting or changing an element programmatically (with BreadcrumbAddLink, BreadcrumbInsertLink or BreadcrumbModifyLink).
      For example, if the Breadcrumb control contains "Photos >> Digital", the Caption property can be used to get and change each element in the breadcrumbs:
      SMP_MyBreadcrumb[1].Caption = "Photographs"
  • get the full content of the breadcrumbs. For example:
    SMP_MyBreadcrumb.Caption = "Photographs >>Digital"
WINDEV

Menu management: Functions or properties?

Menu options (main menus and context menus) can be manipulated using the Menuxxx functions and the corresponding properties.
See the table below:
Available functionsEquivalent properties
MenuUnmark
MenuIsMarked
MenuMark
Checked
MenuStateState
MenuInvisibleVisible
MenuSelectMinusState
MenuSelectPlusState
MenuLabelCaption

Limitations

WINDEVWEBDEV - Código ServidorReportes y ConsultasiPhone/iPadIOS Widget In a report, the Caption property can only be used on "Static Text" and "Link" controls.
WINDEVWINDEV Mobile In a window, the Caption property cannot be used on the following types of controls:
  • Spin
  • Scrollbar
WINDEV The Caption property can be used on automatic calculation rows to modify the text of the calculation. For more details, see Programming automatic calculations in the columns of a Table control.
Java The Caption property can only be used with the following elements:
  • Button.
  • Static.
  • Edit control.
  • Image.
  • Check Box.
  • Radio Button.
  • List Box.
  • Combo Box.
  • TreeView.
  • Tab.
  • Window.
  • Table.
  • Table column.
Widget Android The Caption property can only be used with the following elements:
  • Button control.
  • Static Text control.
iPhone/iPadIOS Widget The Caption property is not available on Table controls. However, it is available for table columns.
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