PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Content of Static control
  • Equivalence
  • Caption associated with a window or with a page
  • Caption associated with a Static control, an Edit control, a Combo box, a List box or a Listview
  • Caption associated with a table column
  • Caption of 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
  • Caption of a Site Map Path control
  • Differences between WINDEV and WINDEV Mobile: Managing the menu options
  • Limits
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
In a database, ..Caption is used to:
  • Find out the caption associated with a file item.
    Note: The item was created in the data model editor or by programming.
  • Find out the caption associated with a data file.
    Note: The data file may have been created in the data model editor or by programming.
  • Find out and modify the connection caption. The connection can correspond to:
In a report, ..Caption is used to find out or modify the text:
  • of a Static control.
  • of a Link control.
  • Versions 17 and later
    of a Chart control.
    New in version 17
    of a Chart control.
    of a Chart control.
In a window or in a page, ..Caption is used to:
  • Find out and modify the caption of a control 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 - Server code Find out the content of a site map path.
Reminder: The initial caption of a control, window, page or menu option is defined in the editor during the object description.
WEBDEV - Server code The modification is available for the "Automatic" or "Dynamic" controls only ("Details" tab of control description).
WEBDEV - Server code The modification is available for the "Automatic" or "Dynamic" controls only ("GUI" tab of control description).
Versions 16 and later
Universal Windows 10 App This property is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This property is now available for the Windows Phone applications.
Universal Windows 10 App This property is now available for the Windows Phone applications.
Versions 15 and later
Android This property is now available for the Android applications.
New in version 15
Android This property is now available for the Android applications.
Android This property is now available for the Android applications.
Versions 17 and later
iPhone/iPad This property is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for the iPhone/iPad applications.
iPhone/iPad This property is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls in the iPhone/iPad applications.
Android Widget This property is now available in Android Widget mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls in the iPhone/iPad applications.
Android Widget This property is now available in Android Widget mode.
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls in the iPhone/iPad applications.
Android Widget This property is now available in Android Widget mode.
Versions 20 and later
Android This property is now available for the Table controls and for the table columns in the Android applications.
iPhone/iPad This property is now available for the table columns in the iPhone/iPad applications.
New in version 20
Android This property is now available for the Table controls and for the table columns in the Android applications.
iPhone/iPad This property is now available for the table columns in the iPhone/iPad applications.
Android This property is now available for the Table controls and for the table columns in the Android applications.
iPhone/iPad This property is now available for the table columns in the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Versions 23 and later
WEBDEV - Browser code This property is now available in browser code.
New in version 23
WEBDEV - Browser code This property is now available in browser code.
WEBDEV - Browser code This property is now available in browser code.
Example
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)
// Find out the caption associated with the Customer.Title item
ResCaption = Customer.Title..Caption
// Modify the text in the "STC_IntroControl" Static control
STC_IntroControl..Caption = "Dear Sir" + Customer.Name
// Equivalent to: STC_IntroControl..Caption = "Dear Sir [%Customer.Name%]"
WINDEVAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJavaUser code (UMC)
// Change the caption of the button
IF WIN_Window1..Modified = True THEN
        BTN_Add..Caption = "Save"
ELSE
        BTN_Add..Caption = "Close"
END
Syntax
WINDEVWEBDEV - Server codeAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)

Finding out the caption associated with an item Hide the details

<Result> = <File Name>.<Item Name>..Caption
<Result>: Integer
Caption of item.
<File Name>: Character string (with or without quotes)
Logical name of data file used.
<Item Name>: Character string (with or without quotes)
Name of item used.

Finding out the text of caption associated with an element Hide the details

<Result> = <Element Name>..Caption
<Result>: Character string
Text displayed in the specified element.
<Element Name>: Character string (with or without quotes)
Name of element to use.

Modifying the text of caption associated with an element Hide the details

<Element Name>..Caption = <New Text>
<Element Name>: Character string (with or without quotes)
Name of element to use.
<New Text>: Character string
New text displayed in the specified element.
Remarks

Content of Static control

To retrieve the value of a control or the value of an item in a Static control:
  • In the report editor: insert [%<Control Name>%] or [%<Item Name>%] into the control caption.
  • In programming: two syntaxes are available with ..Caption:
    • use [%<Control Name>%] or [%<Item Name>%] in the string corresponding to the caption. For example:
      STC_IntroControl..Caption = "Dear Sir [%Customer.Name%]"
    • use the name of the control or the name of the item in the caption. For example:
      STC_IntroControl..Caption = "Dear Sir" + Customer.Name

Equivalence

..Caption is equivalent to ..Value.
To retrieve the text of a Static control, the following syntaxes are equivalent:
ResCaption = <Name of Static control>..Caption

ResCaption = <Name of Static control>..Value

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

<Name of Static Control>..Value = <New Text>

<Name of Static Control> = <New Text>
WINDEVWEBDEV - Server codeAndroidiPhone/iPadWindows MobileUniversal Windows 10 AppJavaPHPAjaxUser code (UMC)

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 ..Title.
WINDEVWEBDEV - Server codeAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJavaPHPAjaxUser code (UMC)

Caption associated with a Static control, an Edit control, a Combo box, a List box or a Listview

The caption of a control corresponds to the text of the caption.
For a Static control, this text is returned by ..Value.
Android Widget This property is available for a Static control only.
WINDEVWEBDEV - Server codeAndroidiPhone/iPadWindows MobileJavaAjaxUser code (UMC)

Caption associated with a table column

The caption of a table column corresponds to the title of the column and it is returned by ..Title.
WINDEVWEBDEV - Server codeAndroidiPhone/iPadWindows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)

Caption of Check Box or Radio Button control

..Caption is used to find out and modify:
  • the caption of Check Box or Radio Button control,
  • the caption of an option found 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>[<Subscript>]..Caption = <New Caption>
For example:
RADIO_RadioButton[2]..Caption = "Option #2"
To modify the caption associated with a Check box or Radio Button control:
<Control Name>..Caption = <New Caption>
For example:
RADIO_RadioButton..Caption = "Age of participants"
To retrieve the caption of an option:
<Control>[Subscript]..Caption
WINDEVUser code (UMC)

Caption of a Check Box column in a Treeview Table control

..Caption applied to a Check Box column found in a TreeView Table control is used to find out and modify the caption displayed beside the check box.
WINDEVWEBDEV - Server codeReports and QueriesAndroidiPhone/iPadWindows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)

Caption associated with an Image control

..Caption returns or replaces the current image by the image whose name is passed in parameter.
..Caption is equivalent to a direct assignment of the control with the name of the image (Control = Image_Name).
The Image control includes a caption: therefore, ..Caption is used to modify this caption. If the new caption does not correspond to a valid image, the caption of the Image control is modified.
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)

Caption associated with a button

..Caption can have two actions:
  • replace the image of the button (the name passed in parameter corresponds to an image file),
  • return or replace the caption associated with the button (the text passed in parameter does not correspond to an image file).
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"
Note: If the specified control contains the & character, the letter that follows the & character is considered as being the shortcut of the control.
Versions 20 and later
WINDEV Note: The caption of a Button control can be in RTF or not ("RTF" checked in the "General" tab of the control 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 modification, the text associated with the caption of the control can be a RTF text or not. The Button control will adapt automatically.
New in version 20
WINDEV Note: The caption of a Button control can be in RTF or not ("RTF" checked in the "General" tab of the control 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 modification, the text associated with the caption of the control can be a RTF text or not. The Button control will adapt automatically.
WINDEV Note: The caption of a Button control can be in RTF or not ("RTF" checked in the "General" tab of the control 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 modification, the text associated with the caption of the control can be a RTF text or not. The Button control will adapt automatically.
WEBDEV - Server code ..Caption operates on the Text buttons only. To modify the image of a fixed-image button, you have the ability to use ..Image in browser code.
WINDEVWindows MobileJavaUser code (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 - Server codeAjax

Caption of a Site Map Path control

..Caption is used to:
  • find out and modify the caption used to identify an element in the site map path. This caption was defined:
    • in the page editor, during the control description.
    • by programming, when adding, inserting or modifying an element (SiteMapPathAddLink, SiteMapPathInsertLink, SiteMapPathModifyLink).
      For example, if the site map path contains "Digital >> Photos", ..Caption is used to find out and modify each element of the path:
      SMP_MyPath[1]..Caption = "Photographs"
  • find out the full content of a site map path. For example:
    SMP_MyPath..Caption = "Digital >>Photographs"
WINDEVWindows Mobile

Differences between WINDEV and WINDEV Mobile: Managing the menu options

WINDEV: The menu options (in main menus or in popup menus) can be managed by the Menuxxx functions and by the corresponding properties.
WINDEV Mobile: To optimize the size of the WINDEV framework installed on the Pocket PC, the menu options can only be managed by the properties.
The equivalence table is as follows:
Available functions
in WINDEV
Equivalent properties
MenuUnmark
MenuIsMarked
MenuMark
Checked
MenuStateState
MenuInvisibleVisible
MenuSelectMinusState
MenuSelectPlusState
MenuLabelCaption

Limits

WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadWindows MobileUniversal Windows 10 App In a report, ..Caption only applies to the "Static" controls and to the "Link" controls.
WINDEVWINDEV Mobile In a window, ..Caption cannot be used on the following types of controls:
  • Spin
  • Scrollbar
Versions 22 and later
WINDEV ..Caption can be used on the automatic calculation lines to modify the caption of calculation. See Programming automatic calculations in the columns of a Table control for more details.
New in version 22
WINDEV ..Caption can be used on the automatic calculation lines to modify the caption of calculation. See Programming automatic calculations in the columns of a Table control for more details.
WINDEV ..Caption can be used on the automatic calculation lines to modify the caption of calculation. See Programming automatic calculations in the columns of a Table control for more details.
Java ..Caption only applies to the following elements:
  • Button.
  • Static control.
  • Edit control.
  • Image.
  • Check box.
  • Radio button.
  • List box.
  • Combo box.
  • TreeView.
  • Tab.
  • Window.
  • Table.
  • Table column.
Android Widget ..Caption only applies to the following elements:
  • Button control.
  • Static control.
iPhone/iPad ..Caption is not available for the Table controls. However, it is available for the table columns.
Minimum required version
  • Version 9
This page is also available for…
Comments
Exemplo Relatorio - Alterar Caption
Exemplo Relatorio - Alterar Caption


HReadSeek(empresa,id_empresa,gnEmpresacodigo)

IF empresa.cnpj<>"" THEN
STC_cnpj_cpf..Caption="Cnpj"
STC_EMP_CGC=empresa.cnpj
ELSE
STC_cnpj_cpf..Caption="Cpf"
STC_EMP_CGC=empresa.cpf

END

//Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/10/aula-946-windev-curso-relatorio-31.html

https://www.youtube.com/watch?v=G3e59Zvu_fw

De matos
Oct. 20 2016