GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Nine — Dialog Functions (continued)
DataControlGetChangingText Function
Overview
The DataControlGetChangingText function retrieves the text of the Edit Control after the user has committed the change.
Syntax/Parameters
Syntax
string = DataControlGetChangingText ( int id );
Parameters
id
An int containing the control ID of the data control.
Return Value
A UTF encoded string containing the edit control’s display text. The string will be empty on error. Since empty strings are invalid data, the GetLastError, IsError or IsNotError function must be used to determine if an error occurred.
Remarks
When a user commits a change, either by pressing Enter, Tab or if the control looses focus, a series of actions will be sent including DCN_EDIT_CHANGING. This function only operates in response to the DCN_EDIT_CHANGING message and allows for data to be validated and potentially rejected. Alternatively, the text can be conditioned, the cell context changed and the current edit action rejected.
Example of limiting the size and case of a cell:
case DCN_EDIT_CHANGING: pos = DataControlGetCaretPosition(MY_DATA_CONTROL); if (IsError()) { break; } // add test for specific cell s1 = DataControlGetChangingText(MY_DATA_CONTROL); s1 = MakeUpperCase(GetStringSegment(s1, 0, 5)); DataControlSetCellText(MY_DATA_CONTROL, pos["Row"], pos["Col"], s1); DataControlSetActionReturnCode(MY_DATA_CONTROL, ERROR_SOFT); break;
Note that if the action return code is not set to cancel, the cell will be set by the data control to the new edit control content.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.