-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Returning the focus to the original receiver #8649
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@N-thony it seems to work fine on some dialogs. Others resturn and nothing is in turquoise. Here is an example:
The stem and leaf is another like that:
@rdstern have a look now, I noticed that some dialogues might have the same issue of tab orders that I have fixed in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine. Perhaps @Patowhiz can confirm
instat/ucrSelector.vb
Outdated
@@ -63,6 +63,12 @@ Public Class ucrSelector | |||
'always load selector contents on load event because contents may have been changed at R level | |||
'and the control needs to refresh the data frame names. | |||
LoadList() | |||
'always return the focus to the first Receiver when re-opening the dialogue. | |||
If lstOrderedReceivers.Count > 0 Then | |||
Dim lstVisibleReceivers = lstOrderedReceivers.Where(Function(ctrl) ctrl.Visible).ToList() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@N-thony could you specify the type of lstVisibleReceivers
explicitly. This has many merits relating to long term code maintenance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lstVisibleReceivers
contains list of visible receivers especially in cases where we have different options in the dialogue.
This will allow to find the first receiver and set the focus on it. I noticed we are not paying attention to the tab orders in the dialogue, it has to be fixed, I have mentioned that ot the team.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@N-thony I understand what the predicate is doing in the where clause.
Could you then specify the type explicitly, for example Dim lstVisibleReceivers As List(Of Control)
. I understand that VB.Net allows dynamic types, but to be consistent with the code base and also for self documenting code, I strongly recommend static typing in this case.
@rdstern I hope you have tested this with dialogs that have multiple features. I'm particularly interested with dialogs that have multiple features yet use different receivers. The sequence of reload may cause regression in the changes introduced here. |
@rdstern you can test this esp to dialogue with different receivers, and let me know a possible issue or regression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Patowhiz I have checked again. I really like this improvement and did check with many dialogs. I can't see any problems. My nervousness is that you know of some problems and are really just trying to teach me the lesson that I'm not checking carefully enough?
If that's not the case, then please continue with your checks and then merge!
@rdstern thanks for your response. I'm glad you were able to check again on the dialogs that I was concerned about. |
Fixes #8256
@rdstern I have tested this with some dialogues in the Describe menu, have a look