Why doesn't my combo box's OnChange event fire when its parent is a TStringGrid? [duplicate]

StackOverflow https://stackoverflow.com/questions/13080209

  •  14-07-2021
  •  | 
  •  

Question

Possible Duplicate:
Why don’t child controls of a TStringGrid work properly?

I have a TStringGrid of variable length, and one column has a TComboBox to alter the data inside. I have made its parent the TStringGrid so that if it is scrolled down I can use the position of the selected rectangle inside the StringGrid.

The problem has arisen because I need to fire an OnChange event: The issue is that when its parent is StringGrid, the only way to fire the OnChange event seems to be using the keyboard events, and selecting its items will not fire the event. I have also tried to redeclare the OnChange event after changing the parent and the OnClick event (which doesn't fire whatsoever).

I'm not really sure why this is occurring but it defintely seems to be a problem with the parent being a TStringGrid.

Was it helpful?

Solution

It is common problem for controls with Parent = TStringGrid.

Look at the solution here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top