[Lazarus] Dropdown in stringgrid ?

Jesus Reyes A. jesusrmx at gmail.com
Wed Jun 3 01:19:28 CEST 2015

En Tue, 02 Jun 2015 06:01:05 -0500, Koenraad Lelong  
<lazarus2 at de-brouwerij.be> escribió:

> Hi,
> I'm trying to make a "universal importer".
> I have a database I want to populate/modify with data from a csv-file.  
> The column order of the csv-file cannot be imposed. So I have to have a  
> way to say which column of the csv-file is which field in the database.
> I have a commercial application that has something like a stringgrid but  
> the first row has dropdown's with possible field-names. I was trying to  
> mimic this, more or less, but had issues.
> Is this possible someway ? Any hints ?
> Koenraad

In the grid such combobox is called a picklist.

1. Select the grid
2. In the Object Inspector select the columns property and click the "..."  
3. Add some custom columns
4. Select the column where you wish to add a pick list
5. In the Object Inspector change the ButtonStyle to cbsPickList
6. In the Object Inspector select the PickList property and click the  
"..." button.
7. Add all options you want to this list.
8. make sure the grid is editable.

Jesus Reyes A.

More information about the Lazarus mailing list