Terminal.Gui icon indicating copy to clipboard operation
Terminal.Gui copied to clipboard

ComboBox Cursor.Down should expand dropdown

Open tznind opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. Currently the toggle list dropdown key is F4. It would be more intuitive if the down button also opened the box. There is an arrow on the right of the control pointing down and this is the behaviour of windows and other desktop guis.

image

Describe the solution you'd like

Cursor down expands dropdown list

private bool? MoveDown ()
{
    if (_search.HasFocus)
    {
    }
+     else
+    {
+          // Expand combo box list
+     }

Describe alternatives you've considered Trying to bind Cursor down using the Keybindings system runs into issues because down is already bound to navigating the list

tznind avatar Aug 22 '24 20:08 tznind

I agree. I spent some time trying to fix this in combo box as part of #3627 but it's a bit convoluted. Part of the issue, I think is focus related.

I want to use this scenario as a test-case for ensuring I have the new focus design and implementation working right. So I'm assigning this to myself.

tig avatar Aug 22 '24 23:08 tig

@tig don't forget to popup the ListView on a separate View and add to the Application.Top, like the Menu does, instead of be a ComboBox's subview. This allow the ListView be visible outside the ComboBox superview.

BDisp avatar Aug 23 '24 09:08 BDisp

@tig don't forget to popup the ListView on a separate View and add to the Application.Top, like the Menu does, instead of be a ComboBox's subview. This allow the ListView be visible outside the ComboBox superview.

Yep.

However, let's acknowledge that the fact that the only way we've figured out how to have Views like ComboBox and MenuBar do 'pop-oversis to have them add views toTop` is just dum.

It is my goal for #2491 that we provide a solution for this that is elegant.

tig avatar Aug 23 '24 14:08 tig

Yep.

However, let's acknowledge that the fact that the only way we've figured out how to have Views like ComboBox and MenuBar do 'pop-oversis to have them add views toTop` is just dum.

For the MenuBar isn't totally dum because they have menus, which may have one or more sub-menus and it's more easy to add to a top view. For ComboBox I think it's enough and better to use Application.Run(popup).

It is my goal for #2491 that we provide a solution for this that is elegant.

I know you'll do a very good work for sure.

BDisp avatar Aug 23 '24 14:08 BDisp