PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Displaying information in an Edit control
  • Retrieving the value entered in an Edit control
  • Properties specific to Edit controls
  • Special case: Upload Edit control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
You can handle Edit controls programmatically. To do so, use the variable that corresponds to the Edit control in the code.
This variable is the name of the control itself. The type of variable depends on the type of Edit control (numeric, text, currency, etc.).
Displaying information in an Edit control
To display information in an Edit control, simply assign a value.
For example:
  • direct assignment:
    EDT_CustomerLastName = "Doe"
  • assignment using a variable:
    EDT_LASTNAME = Customer_LastName
  • assignment by calculation:
    EDT_LASTNAME = NoSpace(CUSTOMER.LASTNAME) + TAB + NoSpace(CUSTOMER.FIRSTNAME)
Remark: If the control is associated with a data file item, the assignment is automatically performed via: You can also use the following notation: CustomerLastName = CUSTOMER.LASTNAME. For more details, see Binding an Edit control to an item.
Retrieving the value entered in an Edit control
To retrieve the content of an Edit control:
  • perform a simple assignment.
    For example:
    CurrentEditContent = EDT_EDIT1
  • retrieve part of the information.
    For example:
    Initial = Left(EDT_LastName, 1)
    Initial = EDT_LastName[[1]]
  • use the Value property
Remark: If the control is bound to a data file item, the value entered in the control is automatically updated in the data source using:
You can also use the following notation: CUSTOMER.LASTNAME = Edit1. For more details, see Binding an Edit control to an item.
Properties specific to Edit controls
The following properties allow you to define the characteristics of Edit controls.
Any type of edit control
HorizontalAlignmentGets and sets the horizontal alignment of an Edit control.
VerticalAlignmentGets and sets the vertical alignment of an Edit control.
CursorGets and sets the position of the mouse cursor in an Edit control.
DndTargetGets and sets the behavior of the target control during a drag and drop operation.
DndSourceGets and sets the behavior of the source control during a drag and drop operation.
EllipsisGets and sets the type of ellipsis in an Edit control.
CursorEndGets and sets the end position of the mouse cursor.
InputMaskGets and sets the input mask.
LeftIndentGets and sets the left indent of the text in the Edit control.
RichEditDetermines if a control supports RTF, and enables or disables RTF support for that control.
SelectedTextGets and changes the text selected in an Edit control.
InputTypeGets the type of Edit control.
Text Edit controls only
DeleteButtonDetermines whether or not the control contains a Delete button.
AutomaticLinkGets and sets the link detection mode in multiline Edit controls.
PasswordDetermines if an Edit control is of type "Password".
MultilineDetermines if an Edit control supports multiple lines of text.
AutoLineWrapDetermines if a multiline Edit control supports automatic line wrapping.
Currency + Euro Edit controls only
DisplayCurrencyGets and sets the currency used to display or enter a value in a "Currency + Euro" Edit control.
MemoryCurrencyGets and sets the currency used when handling a "Currency + Euro" Edit control programmatically.
Duration and Numeric Edit controls
MaxValueGets and sets the upper bound of values in an Edit control.
MinValueGets and sets the lower bound of values in an Edit control.
For a complete list of WLanguage properties that can be used with Edit controls, see Properties associated with Edit controls.
Special case: Upload Edit control
WEBDEV - Server code The Upload Edit control allows users to easily send files from their computer to the server.
WEBDEV includes two WLanguage functions for handling file uploads:
UploadCopyFileSaves on the server a file "uploaded" by the Web user. This upload may have been performed:
  • via an "Upload" edit control.
  • via a single-file or multi-file Upload control.
UploadFileNameReturns the name of a file "uploaded" by the Web user. This upload may have been performed:
  • via an "Upload" edit control.
  • via a single-file or multi-file Upload control.
For more details, see Uploading files.
Remark: An Upload control to upload individual or multiple files is also available. For more details, see Upload control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment