View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003266 | JEDI VCL | 00 JVCL Components | public | 2005-10-15 08:52 | 2005-10-16 01:49 |
Reporter | elahn | Assigned To | AHUser | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.10 | |||
Summary | 0003266: JvDateEdit Focus Bug | ||||
Description | Steps to reproduce: (Steps 1 & 2 are already done in example program) 1. Drop a TMaskEdit on a form & set the EditMask property 2. Drop a TJvDateEdit on a form 3. Run 4. Type in some invalid text in the TMaskEdit 5. Press TAB 6. Click OK to the error message. 7. Continue typing in the TMaskEdit. You will notice that the cursor appears in the TJvDateEdit, even though the TMaskEdit still has the focus. enjoy life, Elahn | ||||
Tags | No tags attached. | ||||
2005-10-15 08:52
|
JvDateEdit_Focus_Bug.zip (1,036 bytes) |
2005-10-15 12:35
|
JvToolEdit.zip (31,445 bytes) |
|
Fixed in attached JvToolEdit.zip. In TJvCustomComboEdit.FocusSet, check if GetFocus = Handle before calling SetShowCaret. |
|
Fixed in CVS. The main problem is that FocusSet is the handler for WM_SETFOCUS. And WM_SETFOCUS is captured by the VCL to make OnExit and OnEnter working. So the "inherited FocusSet" triggers the OnExit event of the other control which shows the error dialog and sets the focus to itself. Windows.GetFocus does not always work because it returns the currently focused control and that could change very fast to another control. And it is a pain when Debugging because you always get the handle of a Delphi/BCB window. Better use "Screen.ActiveControl = Self". The VCL knowns which control has the focus. And this does not change while debugging. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-10-15 08:52 | elahn | New Issue | |
2005-10-15 08:52 | elahn | File Added: JvDateEdit_Focus_Bug.zip | |
2005-10-15 12:35 | elahn | File Added: JvToolEdit.zip | |
2005-10-15 12:36 | elahn | Note Added: 0008031 | |
2005-10-16 01:49 | AHUser | Status | new => resolved |
2005-10-16 01:49 | AHUser | Resolution | open => fixed |
2005-10-16 01:49 | AHUser | Assigned To | => AHUser |
2005-10-16 01:49 | AHUser | Note Added: 0008032 |