Link to home
Start Free TrialLog in
Avatar of kacor
kacorFlag for Hungary

asked on

Combobox in stringgrid

Hi,

I tested the solution of https://www.experts-exchange.com/questions/20369496/StringGrid.html and I found the following runtime problem:

1. Click for example the second cell in the second column. Appears the combobox. Select a value in the combobox by clicking. The cell takes over the selected value.
2. Click again on this cell, and appears again in the combobox the earlier selected value. Click somewhere in the table on a cell, the cell get the focus. Then click back on the combox and select an other value. After clicking this value appears in the cell which got the focus.

I'd like to avoid this mistake. How would be possible to prevent this?

Thanks for every comment

wbr Janos
ASKER CERTIFIED SOLUTION
Avatar of mokule
mokule
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Btw
I would suggest to change the first line in form create procedure like below.
It looks better at least for me.

  StringGrid1.DefaultRowHeight := cbInplaceComboBox.Height-1;
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kacor

ASKER

thanks guys for your quick comments, I try to test them but I have to be away for 2 days
wbr
Janos