Delphi实例: 为StringGrid Cell增加ComboBox功能
关键字:StringGrid Cell ComboBox IhaveaTStringGrid.Inoneofthecolumns,Iwant thecellstoactasComboBoxes;i.e.eachofthecellsinthatcolumnwould haveasmalldownarrowbuttonwhich,whenclicked,wouldshowa drop-downlistfromwhichtheusercouldchooseanitemfor
关键字:StringGrid Cell ComboBox
> I have a TStringGrid. In one of the columns, I want
> the cells to act as ComboBoxes; i.e. each of the cells in that column would
> have a small down arrow button which, when clicked, would show a
> drop-down list from which the user could choose an item for the cell.
there are several approaches here. A very simple one would just display a
genuine combobox on top of the cell when the user clicks on the cell. If you
want to see an arrow button in the cell in this scenario you would have to
draw it yourself in an OnDrawCell event.
Attach a combobox to a stringgrid column
unit Unit1;
原文转自:http://www.ltesting.net