How to scroll Firemonkey TListBox without capturing focus in its controls?


I have a TListBox with controls in each item, such as TEdit, TComboBox, TSwitch, etc, aligned to the right. There are about 20 items in this list, so it extends beyond the screen, and thus user needs to scroll (by sliding finger) to get to the bottom.

The problem is that even in a quick gesture, if user swipes their finger initially on one of these controls, that control takes focus and the list doesn’t scroll. Currently, the only way to scroll up or down is to swipe the finger on the left side of the list, where there aren’t any controls. I could disable HitTest or CanFocus, but then that control would never get focus, even when the user wants to actually tap on it.

How can I allow user to swipe up or down on these controls to scroll the list without that control taking focus?

Comments are closed.