Another FocusChanging Problem
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=16298
Printed Date: 15 November 2024 at 8:49am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Another FocusChanging Problem
Posted By: jpbro
Subject: Another FocusChanging Problem
Date Posted: 26 February 2010 at 5:00pm
If you have SkipGroupFocus = True and you also have something like:
Private Sub ReportControl1_FocusChanging(ByVal NewRow As XtremeReportControl.IReportRow, ByVal NewColumn As XtremeReportControl.IReportColumn, ByVal NewItem As XtremeReportControl.IReportRecordItem, Cancel As Boolean) Cancel = NewRow.GroupRow End Sub
|
I would expect that there would be no circumstances when a group row could get focus. However, this is not the case. If the currently focused row is a child of the group row, then clicking the group row will move the focus rectangle there, and clicking it again will move the selection there.
If the currently focused row is not a child of the group row that you click, then the focus will never move there (as expected).
Demonstraton:
uploads/20100226_170023_RcFocusChanging.zip - uploads/20100226_170023_RcFocusChanging.zip
Is it just me or is this a bug?
------------- Product: Xtreme SuitePro (ActiveX) version 16.2.6 Platform: Windows XP - SP3
Language: Visual Basic 6.0 SP6
|
Replies:
Posted By: SuperMario
Date Posted: 26 February 2010 at 5:31pm
I'll look into this later...and maybe restart the marathon build...no promises to make it in 13.3 though
|
Posted By: mgampi
Date Posted: 26 February 2010 at 6:01pm
Hi;
I catched the same with MFC version. See thread http://forum.codejock.com/forum_posts.asp?TID=16242 - http://forum.codejock.com/forum_posts.asp?TID=16242
------------- Martin
Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022
|
Posted By: jpbro
Date Posted: 26 February 2010 at 6:38pm
okay, thanks SuperMario.
------------- Product: Xtreme SuitePro (ActiveX) version 16.2.6 Platform: Windows XP - SP3
Language: Visual Basic 6.0 SP6
|
Posted By: jpbro
Date Posted: 26 February 2010 at 7:11pm
I was just looking for an ugly work-around, but unfortunately, even though the focus changes on mouse-click, the MouseDown and MouseUp events don't fire :(
MouseMove doesn't fire either until the mouse is moved after clicking (in most cases this happens quickly, but not always - for example using a trackpad on a laptop, the user may click but not touch the trackpad). So a partial workaround is:
Private Sub ReportControl1_MouseMove(Button As Integer, Shift As Integer, x As Long, y As Long) If Me.ReportControl1.FocusedRow.GroupRow Then Set Me.ReportControl1.FocusedRow = Me.ReportControl1.FocusedRow.Childs(0) End If End Sub
|
I'll keep try to find a better workaround and post results back here.
------------- Product: Xtreme SuitePro (ActiveX) version 16.2.6 Platform: Windows XP - SP3
Language: Visual Basic 6.0 SP6
|
Posted By: jpbro
Date Posted: 26 February 2010 at 7:14pm
Minor correction - MouseDown fires, but it fires *before* the focus is moved, so changing the focus there doesn't help. MouseUp does not fire.
------------- Product: Xtreme SuitePro (ActiveX) version 16.2.6 Platform: Windows XP - SP3
Language: Visual Basic 6.0 SP6
|
Posted By: jpbro
Date Posted: 27 February 2010 at 12:19pm
There's a demo that tries to workaround the bug available here: http://forum.codejock.com/forum_posts.asp?TID=16302 - http://forum.codejock.com/forum_posts.asp?TID=16302
------------- Product: Xtreme SuitePro (ActiveX) version 16.2.6 Platform: Windows XP - SP3
Language: Visual Basic 6.0 SP6
|
Posted By: SuperMario
Date Posted: 27 February 2010 at 11:01pm
I did look at the problem, and when trying to fix it I ran into some things that need to be considered.
How should keyboard navigation act? How would you expand a group via keyboard if groups can't get selected? In your example lets say group B and C is closed and focus is in a child of A, how then can I expand B or C via keyboard? What happens if using the keyboard I then close ALL groups?
Looking at the source, the code does not handle keyboard navigation that well as it was. I cleaned it up a bit, but I need more details on exactly how this should act before I proceed.
I have the option of allowing it selected but hiding focus rectangle and\or highlighting if needed.
Try to give me exact specifications on how the keyboard navigation should act :) I have the mouse navigation part fixed.
|
Posted By: jpbro
Date Posted: 28 February 2010 at 8:51am
Hi SuperMario,
Thanks a lot for looking into this and fixing the mouse issues around the group rows.
As for how I think the keyboard should be acting, I'll have to think about this a bit more thoroughly and get back to you shortly (I'm on my way out shortlly).
Thanks again.
------------- Product: Xtreme SuitePro (ActiveX) version 16.2.6 Platform: Windows XP - SP3
Language: Visual Basic 6.0 SP6
|
Posted By: SuperMario
Date Posted: 28 February 2010 at 10:19am
OK, thats fine. Either way this issue will be in the next version after 13.3. If you want I can give you a custom build finished.
|
|