BBjListEdit::setMaxLength

Description

In BBj 17.00 and higher, this method sets the maximum length of the text in a BBjListEdit control.

Syntax

Return Value Method
void setMaxLength(int length)

Parameters

Parameter Description

length

Specifies the maximum length of the text in the control.

Return Value

None.

Remarks

If no maximum length is specified, it defaults to 2^31-1 (2147483647) characters.

Example

rem ' BBjListEdit::setMaxLength

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "BBjListEdit::setMaxLength"
window! = sysgui!.addWindow(50,50,300,100,title$,$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
items$ = ""
for i = 0 to 9
    items$ = items$ + "ListEdit Item " + str(i) + $0a$
next i
window!.addStaticText(101,25,25,75,25,"ListEdit1:",$$)
listedit1! = window!.addListEdit(102,100,25,180,180,items$,$$)
window!.addStaticText(103,25,50,80,25,"ListEdit2:",$$)
listedit2! = window!.addListEdit(104,100,50,180,180,items$,$$)
listedit2!.setMaxLength(16)
print "Maximum length of listedit1 is",listedit1!.getMaxLength()
print "Maximum length of listedit2 is",listedit2!.getMaxLength()
process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.