Skip to content
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

TabIndex with the same setter value but with wrong index return without set the correct value. #3351

Closed
BDisp opened this issue Mar 26, 2024 Discussed in #3319 · 0 comments · Fixed by #3352
Closed

TabIndex with the same setter value but with wrong index return without set the correct value. #3351

BDisp opened this issue Mar 26, 2024 Discussed in #3319 · 0 comments · Fixed by #3352
Labels

Comments

@BDisp
Copy link
Collaborator

BDisp commented Mar 26, 2024

Discussed in #3319

Originally posted by dasien March 13, 2024
Hello,

I was hoping to get some clarity on the purpose of the View.TabIndexes list. What i was trying to accomplish was to join two views together, and have the first control on View2 TabIndex be + 1 from the last control in View1.TabIndexes.

What i am finding is that regardless of what i put for the TabIndex value for controls in View 1, even if i say that certain controls have no TabIndex and i set the TabStop to false, the views with no TabIndex and TabStop set to false are still listed in the TabIndexes list which inflates the list with controls. As a consequence, the value i put in for TabIndex for controls which i want to interact with the Tab key is overridden by their order in the TabIndexes list.

Thus, if i have a view with a Label with TabStop = false and nothing set for TabIndex, and a TextField with TabStop = true and TabIndex = 1, and I repeat that pattern say 3 times incrementing the TabIndex by 1 for each TextField so the next TextField.TabIndex = 2 then 3, etc. the values reported for the TextField in the parent View.Tablndexes list is 1,3,5,7 respectively rather than the 1,2,3,4 i set.

I am confused why something is overwriting my set TabIndex values on controls at all and if there is a way for me to turn that off. I could understand the system taking a best guess if i don't put values in and don't also turn off the fact that a particular View should be a tab stop, but it is overwriting the values which are present and making it difficult for me to compute the correct TabIndex of a joined View.

BDisp added a commit to BDisp/Terminal.Gui that referenced this issue Mar 26, 2024
… index return without set the correct value.
BDisp added a commit to BDisp/Terminal.Gui that referenced this issue Mar 27, 2024
… index return without set the correct value.
@tig tig added the bug label Mar 30, 2024
@tig tig closed this as completed in #3352 Mar 31, 2024
tig added a commit that referenced this issue Mar 31, 2024
Fixes #3351 (V1). TabIndex with the same setter value but with wrong index return without set the correct value.
tig added a commit that referenced this issue Mar 31, 2024
Fixes #3351. TabIndex with the same setter value but with wrong index return without set the correct value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants