Gentlefolk,
Using Laz 0.9.28, ZEOS 6.6.6, Windows XP SP3.
I am back on the "DBGrid exit" problem as other problems were resolved by ZEOS 7.0.
I have created a simple one form test application of DBGrid>DataSource>ZQuery structure (NO user code). All works Ok, data displays nicely, etc.
Run the program, click on the cell in the DBGrid which is highlighted and the 'OnExit' event fires. The highlight dissapears, type in one character and the highlight re-appears, type in a second character and the 'OnEvent' event fires.
Reset and run the program again, type in one character (into the 'selected cell/?) and the 'OnExit' event fires.
So why, what is going on?
A look at the stack trace seems to indicate that this is initiated by windows, as follows:
#0 TFORM1__DBGRID1EXIT(0x2f0f8d0, 0x2f0f470) at unit1.pas:39
#1 TWINCONTROL__DOEXIT(0x2f0f8d0) at wincontrol.inc:6091
#2 TCUSTOMGRID__DOEXIT(0x2f0f8d0) at grids.pas:5500
#3 TCUSTOMDBGRID__DOEXIT(0x2f0f8d0) at dbgrids.pas:2350
#4 TWINCONTROL__WMKILLFOCUS({MSG = 8, ) at wincontrol.inc:6203
#5 TCUSTOMGRID__WMKILLFOCUS({MSG = 8, ) at grids.pas:3795
#6 SYSTEM_TOBJECT_$__DISPATCH$formal at :0
#7 NEXTROWHEIGHT(44037616, 49346768, 0x0) at grids.pas:3695
#8 TWINCONTROL__WNDPROC({MSG = 8, ) at wincontrol.inc:4920
#9 TCUSTOMGRID__WNDPROC({MSG = 8, ) at grids.pas:3850
#10 TCUSTOMDBGRID__WNDPROC({MSG = 8, ) at dbgrids.pas:1211
#11 DELIVERMESSAGE(0x2f0f8d0, void) at lclmessageglue.pas:111
#12 WINDOWPROC(3473878, 8, 2359732, 0) at win32callback.inc:2574
#13 USER32!GetDC at :0
#14 ?? at :0
I beleive the MSG=8 is the LM_KILLFOCUS messaage/command from windows.
I have changed the structure to DBgrid/DataSource/MemDataset and the same things happen.
Whats going on? Any help appreciated, Ian