gui-cs / Terminal.Gui

Cross Platform Terminal UI toolkit for .NET
MIT License
9.61k stars 687 forks source link

ComboBox Cursor.Down should expand dropdown #3684

Open tznind opened 1 month ago

tznind commented 1 month ago

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

tig commented 1 month ago

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.

BDisp commented 1 month ago

@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.

tig commented 1 month ago

@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.

BDisp commented 1 month ago

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.