PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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 associated with an Image control
  • Caption associated with a button
  • Caption of a Tab 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.
Reminder: The initial caption of a control, window, page or menu option is defined in the editor during the object 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.
Example
AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App
// 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%]"
AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App
// Change the button caption
IF WIN_Window1..Modified = True THEN
BTN_Add..Caption = "Save"
ELSE
BTN_Add..Caption = "Close"
END
Syntax
AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App

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>
AndroidiPhone/iPadWindows MobileUniversal Windows 10 App

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.
AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App

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

The control caption corresponds to the text of caption.
For a Static control, this text is returned by ..Value.
Android Widget This property is available for a Static control only.
AndroidiPhone/iPadWindows Mobile

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.
AndroidiPhone/iPadWindows MobileUniversal Windows 10 App

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
AndroidiPhone/iPadWindows MobileUniversal Windows 10 App

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.
AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App

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.
Windows Mobile

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.
Windows 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

iPhone/iPadWindows MobileUniversal Windows 10 App In a report, ..Caption only applies to the "Static" controls and to the "Link" controls.
WINDEV Mobile In a window, ..Caption cannot be used on the following types of controls:
  • Spin
  • Scrollbar
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 version required
  • 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
20 Oct. 2016