View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0037451||Lazarus||LCL||public||2020-07-30 10:59||2020-08-02 15:50|
|Reporter||Frans van Leeuwen||Assigned To|
|Summary||0037451: Focused item in CheckGroup not always visible|
|Description||I have a program with a list of records in a StringGrid. I can open a Formto change an indiviudal record and that Form has a PageControl with 4 tabs. On de second and third tab is a Checkgroup and when selecting that tab, the first (available) item of that CheckGroup gets the focus. The problem is: when I use the OnKeyDown method of the StringGrid, the focus in de CheckGroup is visible. But when I use the OnDblClick methode the focus is NOT visible.|
I've added a smal testprogam to prove me right.
|Tags||No tags attached.|
|Fixed in Revision|
||Did you forget the test program?|
||I tried to upload my testprogram but that failed. I asked the webmaster for help.|
CheckGroupFocus.zip (75,304 bytes)
Michael, I suppose this is the demo program that Frans could not upload.
Frans, please understand that this program is rather useless to me (and probably other developers). It is far too complex. I don't know how the grid which I see when the program starts relates to the checkgroup and pagecontrol mentioned in the description. I am not willing to analyze a foreign full program just to eventually being trapped by another bug maybe.
Please remove everything from the demo program which is not needed (why do I need Synapse?) and make sure that it only contains what is needed to trigger the bug. And give clear and precise instructions how to reproduce the bug.
I stripped the testprogram. It now shows a one column StringGrid. Press Enter and the next Form shows a CheckGroup of which the first itemhas a visible, dotted line focus. Close the Form and DblClick in the Stringgrid. Now the next Form shows the CheckGroup without a visible focus. That focus is set, crsrdown set focus on the second item.
CheckGroupFocus-2.zip (67,099 bytes)
||Thanks, now the issue can be reproduced.|
Here is another version of the test program which is reduced to the ultimate limit. Press ENTER when the program starts with the grid form open --> the first checkgroup item in the appearing second form is surrounded by a focusrect. Double-click on the first (and only) grid cell when the grid form opens --> the first checkgroup item is NOT surrounded by a focus rect altough in each case the second form is opened by ShowModal, no other code is involved.
When the "TCheckbox(cgpPlayerExtra.Controls).SetFocus;" in the OnShow event handler of the second form is removed or replaced by "cgpPlayerExtra.SetFocus" the focus rect is not drawn even when the second form is opened by the ENTER key.
When the trigger to show the second form is moved to other controls on the main form (to be added) I see the same behavior as with the grid as long as "TCheckbox(cgpPlayerExtra.Controls).SetFocus" is present.
condensed.zip (3,540 bytes)
|2020-07-30 10:59||Frans van Leeuwen||New Issue|
|2020-07-30 11:57||wp||Note Added: 0124415|
|2020-07-30 12:37||Bart Broersma||Status||new => feedback|
|2020-07-30 12:37||Bart Broersma||LazTarget||=> -|
|2020-07-30 17:20||Frans van Leeuwen||Note Added: 0124424|
|2020-07-30 17:20||Frans van Leeuwen||Status||feedback => new|
|2020-08-01 10:41||Michael Van Canneyt||Note Added: 0124453|
|2020-08-01 10:41||Michael Van Canneyt||File Added: CheckGroupFocus.zip|
|2020-08-01 11:25||wp||Note Added: 0124454|
|2020-08-01 11:26||wp||Note Edited: 0124454||View Revisions|
|2020-08-01 11:28||wp||Note Edited: 0124454||View Revisions|
|2020-08-01 12:01||Frans van Leeuwen||Note Added: 0124455|
|2020-08-01 12:01||Frans van Leeuwen||File Added: CheckGroupFocus-2.zip|
|2020-08-01 12:28||wp||Note Added: 0124456|
|2020-08-02 15:49||wp||Note Added: 0124498|
|2020-08-02 15:49||wp||File Added: condensed.zip|
|2020-08-02 15:50||wp||Note Edited: 0124498||View Revisions|