Navigation:  thinBasic language > Modules > UI (User Interface) > CONTROLs >

CONTROL ADD LISTBOX

Previous pageReturn to chapter overviewNext page

 

Description

 

Create a new ListBox control inside a dialog.

 

Syntax

 

hndl = CONTROL ADD LISTBOX, hwnd, ctrlID, [StringArray()], xPos, yPos, Width, Height [, [Style] [, [ExStyle]]]

 

Returns

 

Number

Control window handler.

 

Parameters

 

Name

Type

Optional

Meaning

hwnd

Number

No

Handle of the dialog containing the control

ctrlID

Number

No

Control identifier

StringArray

String

Yes

Optional dynamic string array containing the initial items to be displayed in the list box.  Items are copied from the array to the list box.

To create a list box that is initially empty, either omit this parameter, or specify an array whose first element contains an empty string.

If the list box uses the %LBS_SORT style, the items are sorted alphanumerically as they are added to the list box.

Both fixed or dynamic string arrays are handled. In case of fixed strings, elements are right trimmed.

xPos

Number

No

Horizontal position of the control inside the dialog

yPos

Number

No

Vertical position of the control inside the dialog

Width

Number

No

Control width

Height

Number

No

Control height

Style

Number

Yes

Primary style of the control. See LISTBOX Style equates.

ExStyle

Number

Yes

Extended style of the control. See LISTBOX ExStyle equates.

 

Remarks

 

Restrictions

 

See also

 

Examples

 

 

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.6.0.10 Web Site: http://www.thinbasic.com