|
A TListBox is used to show your program users a list from
which they
can select items, they can add delete individual items etc.
You can use Columns to specify the amount of
columns you
want in your TListBox.
Have a look at the examples below to learn more about what a ListBox can do. |
`Clearing the contents of a TListBox:
procedure TForm1.Button1Click(Sender: TObject);
|
When you have a TListBox and you
would like
a word in the list to appear visible in the ListBox you can use this
code:
procedure TForm1.Button1Click(Sender: TObject);
In the ListBox we have a list of words: One
After clicking on Button1 the ListBox will scroll to the word
'Three'.
|
To change all the text in a TListBox
to capitals
(UpperCase) do this:
procedure TForm1.Button2Click(Sender: TObject);
|
Finding A Word In A TListBox:
Add the words One
Add a button to Form1.
procedure TForm1.BitBtn1Click(Sender: TObject);
Run the program and you will find that the code found the word you wanted. |
To Find A Word In A TListBox Then
Delete It:
Add the words One
Add a button to Form1.
procedure TForm1.BitBtn1Click(Sender: TObject);
|
Deleting an Item from a TListBox
With A Mouse
Click:
procedure TForm1.ListBox1Click(Sender: TObject);
|
Adding the contents of Edit1 to a
TListBox:
procedure TForm1.Button1Click(Sender: TObject);
|
Changing a TListBox columns using a
SpinEdit:
procedure TForm1.Button1Click(Sender: TObject);
Adding Columns to a TListBox: procedure TForm1.Button1Click(Sender: TObject);
|
Selecting a line in a TListBox:
procedure TForm1.Button1Click(Sender: TObject);
|
Loading and Saving a file with a
TListBox:
procedure TForm1.Button1Click(Sender: TObject);
procedure TForm1.Button2Click(Sender: TObject);
|
Sorting a TListBox:
procedure TForm1.Button1Click(Sender: TObject);
|
Creating a list of strings in a
TListBox.
procedure TForm1.Button5Click(Sender: TObject);
|
Adding Fonts to a TListBox:
procedure TForm1.Button1Click(Sender: TObject);
|
Adding 1 to 100 into a TListBox:
procedure TForm1.Button1Click(Sender: TObject);
|
Adding 100 sentences to a TListBox:
procedure TForm1.Button1Click(Sender: TObject);
|
Inserting a Yellow Ellipse into a
TListBox:
procedure TForm1.Button2Click(Sender: TObject);
|