[1.3 b3]ComboBox select wrong item
Hi,
We use version 1.3 beta3 and run Tutorial05 with ComboBox.xaml in the smaple.
1. We modify the first ComboBox added 13 items more. Then there will a scrollbar, we use the mouse wheel scroll to the last item "Item 17" and click left mouse to select it, but "Item 8" will be selected .
If we click the scrollbar scroll to the last item it will select right time.
2. In the first picture the ComboBox selector is larger than the main view, when the mouse position is outside the main view but inside the selector VisualTreeHelper::HitTest will return nullptr.
Thanks.
We use version 1.3 beta3 and run Tutorial05 with ComboBox.xaml in the smaple.
1. We modify the first ComboBox added 13 items more. Then there will a scrollbar, we use the mouse wheel scroll to the last item "Item 17" and click left mouse to select it, but "Item 8" will be selected .
If we click the scrollbar scroll to the last item it will select right time.
2. In the first picture the ComboBox selector is larger than the main view, when the mouse position is outside the main view but inside the selector VisualTreeHelper::HitTest will return nullptr.
Thanks.
-
-
sfernandez
Site Admin
- Posts: 3238
- Joined:
Re: [1.3 b3]ComboBox select wrong item
1. I found the bug, we were selecting the wrong item on mouse down when ComboBox had no focus. We will solve it for next release.
2. I don't understand, what do you mean for "larger than the main view"? Which visual are you passing as root in the VisualTreeHelper::HitTest call?
2. I don't understand, what do you mean for "larger than the main view"? Which visual are you passing as root in the VisualTreeHelper::HitTest call?
Re: [1.3 b3]ComboBox select wrong item
Hi,
There is a new picture, we hope it will make the problem more clear. As describe above, is that we should call VisualTreeHelper::HitTest using the ComboBox as root view? If so, the ComboBox is a child view of the main grid view, is that mean every time we do HitTest we should call VisualTreeHelper::HitTest for all child views of the parent view?
Thanks.
There is a new picture, we hope it will make the problem more clear. As describe above, is that we should call VisualTreeHelper::HitTest using the ComboBox as root view? If so, the ComboBox is a child view of the main grid view, is that mean every time we do HitTest we should call VisualTreeHelper::HitTest for all child views of the parent view?
Thanks.
-
-
sfernandez
Site Admin
- Posts: 3238
- Joined:
Re: [1.3 b3]ComboBox select wrong item
Every View has a Root visual that allows Popups and ToolTips to show over the rest of elements.
ComboBox drop down is added as a Popup to the View, so it is not a visual child of the ComboBox.
If you want to test if mouse is over any element of the UI (including Popups and ToolTips) you should do it this way:
Where visual is any visual in the UI tree, for example the ComboBox.
ComboBox drop down is added as a Popup to the View, so it is not a visual child of the ComboBox.
If you want to test if mouse is over any element of the UI (including Popups and ToolTips) you should do it this way:
Code: Select all
VisualTreeHelper::HitTest(VisualTreeHelper::GetRoot(visual))
Re: [1.3 b3]ComboBox select wrong item
Thanks for your detailed feedback!
Who is online
Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 30 guests