You can acquire a number of StringGrid like components that will give you combo boxes (and other facilities). Some of these cost money and others are free.
A fairly simple one, which is free and comes with source code, is TImpStringGrid by Magnus Lidman. I found it on Torry's Delphi Pages.
The idea is to put an invisible combobox in the 3[sup]rd[/sup] column in the StringGrid, and when needed make it visible
The following event handlers are needed
procedure TForm1.FormCreate(Sender: TObject);
begin
//adjust heigth of combobox with line height of stringgrid
StringGrid1.DefaultRowHeight := ComboBox1.Height;
ComboBox1.Visible := False;
end;
I brought a component named TAdvStringGrid which can include combox box, button, Ellipse..., hyperlink, hint for each cell and many many more features.
I use TMSSoftware's Grid Pack and it's brilliant, well worth the money. For little things like sorting columns when you click the header - they're a god send.
The problem occurs at last cell. If the cell isn't displayed fully and you press and hold the mouse button on the arrow of the combobox the cells are scrolled until the last one is displyed and a combobox appears after last cell. Don't know why ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.