View Issue Details

IDProjectCategoryView StatusLast Update
0037451LazarusLCLpublic2020-08-02 15:50
ReporterFrans van Leeuwen Assigned To 
Status newResolutionopen 
Product Version2.0.10 
Summary0037451: Focused item in CheckGroup not always visible
DescriptionI 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.
TagsNo tags attached.
Fixed in Revision
Attached Files



2020-07-30 11:57

developer   ~0124415

Did you forget the test program?

Frans van Leeuwen

2020-07-30 17:20

reporter   ~0124424

I tried to upload my testprogram but that failed. I asked the webmaster for help.

Michael Van Canneyt

2020-08-01 10:41

administrator   ~0124453 (75,304 bytes)


2020-08-01 11:25

developer   ~0124454

Last edited: 2020-08-01 11:28

View 3 revisions

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.

Frans van Leeuwen

2020-08-01 12:01

reporter   ~0124455

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. (67,099 bytes)


2020-08-01 12:28

developer   ~0124456

Thanks, now the issue can be reproduced.


2020-08-02 15:49

developer   ~0124498

Last edited: 2020-08-02 15:50

View 2 revisions

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[0]).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[0]).SetFocus" is present. (3,540 bytes)

Issue History

Date Modified Username Field Change
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:
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:
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:
2020-08-02 15:50 wp Note Edited: 0124498 View Revisions