Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter NineDialog Functions (continued)

ComboBoxLimitEditSize Function

Overview

The ComboBoxLimitEditSize function specifies a maximum number of characters that can be entered into the edit portion of a combo box.

Syntax/Parameters

Syntax

int = ComboBoxLimitEditSize ( int id, int size );

Parameters

id

An int containing the control ID of a combo box.

size

An int representing the maximum number of characters the user can enter, not including the terminating null character. If this parameter is zero, the text length is limited to 0x7FFFFFFE characters.

Return Value

Returns an int as ERROR_NONE or a formatted error code on failure. Common error codes are as follows: ERROR_RANGE if id is an invalid control ID for the open dialog or ERROR_INVALID_HANDLE if no dialog is open. Use the GetLastError function to retrieve error information.

Remarks

The ComboBoxLimitEditSize function limits only the text the user can enter. It has no effect on any text already in the edit control when the message is sent, nor does it affect the length of the text copied to the edit control when a string in the list box is selected. Note that if the CBS_AUTOHSCROLL style is not set for the resource, the text may be limited by the width of the edit area. Therefore, if the combo box does not have the CBS_AUTOHSCROLL style, setting the text limit to be larger than the size of the edit control has no effect.

The default limit to the text a user can enter in the edit control is 30,000 characters.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic