String List editor
Go Up to Property Editors Index
Use the String List editor at design time to add, edit, load, and save strings into any property that has been declared as TStrings.
To open the String List editor:
- Place a component that uses a string list on the form, such as Vcl.StdCtrls.TComboBox.
- With that component selected, do one of the following:
- Click the ellipsis [...] in the Value column for any property that has been declared as TStrings, such as the Items property of the TComboBox.
- Double-click the word (TStrings) in the Value column for any property that has been declared as TStrings.
Note: If the property is a value list, the Value List Editor is displayed.
Contents
Code Editor button
To convert the list to text, click Code Editor. The list is displayed on a separate page in the Code Editor where you can edit the list using all of the editing commands.
The String List editor uses only a proportional font, in which characters can have different widths. For aligning floating-point or other horizontally aligned values, you might want to use a fixed-width or monospace font, such as the following example:
1234.5 3.1416
Opening the Code Editor from the String List Editor allows you to use a monospace font, such as Courier, to better align a list. (To set the font used in the Code Editor, select Tools > Options > Editor Options > Display and choose an Editor font from the drop-down list.)
To return to the String List editor, right-click the window and choose Close Page from the Code Editor context menu. Then to save the file, choose Yes at the prompt; for example, Save changes to dfm.Form1.Memo1.Lines?
The String List editor context menu (right-click on the editor) contains the following commands:
Load
Click Load to display the Load String List dialog box, where you can select an existing file to read into the String List editor.
Save
Click Save to write the current string list to a file. RAD Studio opens the Save String List dialog box, where you can specify a directory and file name.
ListBox
A list box is a special case as it supports both String List items and items added through an items editor. However, the two types of items are not compatible. See ListBox Items Editor for more information.