1. Home
  2. Computing & Technology
  3. Delphi Programming

TComboBox - Delphi Usage Examples, Tips and Tricks

Delphi's TComboBox displays a drop down collection of items in a scrollable list that users can select and edit. Users can select an item from the list or type directly into the edit box. Learn how to use the drop down box control in Delphi programs.
Drawing a TComboBox: Color Pick List, Font Pick List
Graphical Drop Down List - a Combo Box of Colors; and a True-Type Font Picker.
Implementing OnMouseOver for Items in a TComboBox, with Custom Hints
Here's how to get the caption of an item in a TComboBox as mouse hovers over an item when the ComboBox is in drop down state. Use this "trick" to get the object associated with the "pre-selected" item in a combo box, or to display a custom hint for each item, for example.
Store a String (or an Object) Along with a String in Combo Box
There are situations when you want to display a list of strings to the user, for example in the list box control, but also have a way to store one more additional string along the one displayed to the user.
How to Right Align Items in a TComboBox
Suppose you have a ComboBox displaying currency values, or more generally numbers. Here's how to display the items in a ComboBox right-aligned...
How to complete partial strings typed into a combo box
The example shows how to complete partial strings typed into a combo box. The code represents the OnKeyPress event handler of the combo box, which performs most of the default keystroke handling before finding matching list item and updating the text.
Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Using VCL Components
  5. TComboBox

©2009 About.com, a part of The New York Times Company.

All rights reserved.