mirror of
https://github.com/VladimirMarkelov/clui.git
synced 2025-04-26 13:49:01 +08:00
clui: NextControl() also filter out disabled controls
When selecting previous or next controls in we want to also filter out the disabled controls - since they will never get focused.
This commit is contained in:
parent
212c6b3a41
commit
0b2b6067c1
@ -203,7 +203,7 @@ func getLinearControlList(parent Control, fn func(Control) bool) []Control {
|
||||
// that has tab-stop feature on. Used by library when processing TAB key
|
||||
func NextControl(parent Control, curr Control, next bool) Control {
|
||||
fnTab := func(c Control) bool {
|
||||
return c.TabStop() && c.Visible()
|
||||
return c.TabStop() && c.Visible() && c.Enabled()
|
||||
}
|
||||
|
||||
linear := getLinearControlList(parent, fnTab)
|
||||
|
Loading…
x
Reference in New Issue
Block a user