Combo boxes near the bottom of the screen

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Combo boxes near the bottom of the screen

davidbuck
Normally when you click on a combo box, you can release the mouse button
then click again tp select the item from the list or to scroll the list
using the scroll bars.  If the combo box is near the bottom of the
screen, however, it behaves differently.  As soon as you press the red
mouse button on the combo box, it opens the list view and starts
selecting.  As soon as you release the mouse button, it selects the
item. You can't press, release, then click on an element in the list box
or scroll using the scroll bars.

A sample program is attached to play with.  Move the window just above
the task bar then try selecting an item from the combo box list.

Environment:  VisualWorks 7.7 on Windows 7.  The same behavior is in
VW5i.1 on Windows XP.

Does anyone have a solution for this?

David Buck


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

ComboBoxTest.zip (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Combo boxes near the bottom of the screen

Claus Kick
David Buck schrieb:
> Normally when you click on a combo box, you can release the mouse button
> then click again tp select the item from the list or to scroll the list
> using the scroll bars.  If the combo box is near the bottom of the
> screen, however, it behaves differently.  As soon as you press the red
> mouse button on the combo box, it opens the list view and starts
> selecting.  As soon as you release the mouse button, it selects the
> item. You can't press, release, then click on an element in the list box
> or scroll using the scroll bars.
>

Hello, this sounded interesting so I tried to reproduce it (VW 7.6 NC).
What I found is the following:

1. open the combobox test window
2. open the dropdown menu and select an item or not, but do not close
the dropdownlist again
3. move the combobox test window somewhere
5. try to open the dropdown menu - this will not happen on first try,
only on second try

This is what I think what happens:

If you move the window with the menu still being open, the dropdown menu
is closed, but the dropdown state of the combo box is not updated.
Only if you "close" the "closed" menu and click again, it will be opened
again.

Is this what you meant?
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Combo boxes near the bottom of the screen

davidbuck
I'm seeing the same effect as you but that's a separate problem from the one I'm reporting.  I'll break it down to individual steps to make it clear:

Case 1 (normal case)
    - Move the Combo Box Test window to a point near the top of the screen
    - Press DOWN and hold with the left mouse button on the input field
       - a list appears below the cursor
    - Release the mouse button without moving the mouse
    - Move the mouse to a list item
    - Press DOWN again
    - Release
       - selected item is displayed in the list

Case 2 (unusual case)
    - Move the Combo Box Test window to a point near the BOTTOM of the screen
    - Press DOWN and hold with the left mouse button on the input field
       - a list appears but is centered under the cursor
    - Move the mouse holding the button down
       - Focus shifts to different list items
    - Release the mouse button
       - A list item is selected

Case 1 involves two mouse clicks - open the list then select an item.  Case 2 doesn't allow two clicks and does everything in one click.  Case 1 allows you to click on the scroll bar in the list and scroll. Case 2 doesn't allow you to use the scroll bar because releasing the mouse button selects an item.

Probably the best way to fix this is to have the combo box list appear completely above the combo box if there's not enough space to display it underneath.

David


Claus Kick wrote:
David Buck schrieb:
Normally when you click on a combo box, you can release the mouse button then click again tp select the item from the list or to scroll the list using the scroll bars.  If the combo box is near the bottom of the screen, however, it behaves differently.  As soon as you press the red mouse button on the combo box, it opens the list view and starts selecting.  As soon as you release the mouse button, it selects the item. You can't press, release, then click on an element in the list box or scroll using the scroll bars.


Hello, this sounded interesting so I tried to reproduce it (VW 7.6 NC). What I found is the following:

1. open the combobox test window
2. open the dropdown menu and select an item or not, but do not close the dropdownlist again
3. move the combobox test window somewhere
5. try to open the dropdown menu - this will not happen on first try, only on second try

This is what I think what happens:

If you move the window with the menu still being open, the dropdown menu is closed, but the dropdown state of the combo box is not updated.
Only if you "close" the "closed" menu and click again, it will be opened again.

Is this what you meant?

No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.830 / Virus Database: 271.1.1/2991 - Release Date: 07/09/10 02:36:00


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Combo boxes near the bottom of the screen

davidbuck
The following change seems to fix the problem:

In ComboBoxButtonController:

dropDownWindowBoundsFor: aDropListView
    | parentDisplayBox monitorRectangle intoMonitor dropWindowBounds |
    parentDisplayBox := (self displayBoxOfView: self view editorView)
                merge: (self displayBoxOfView: self view).
    monitorRectangle := Screen default preferredRectangleToConstrain: parentDisplayBox.
    dropWindowBounds := Rectangle origin: parentDisplayBox bottomLeft extent: parentDisplayBox width @ (view dropDownListHeightFor: aDropListView).   

    "Make an adjustment because the bounds didn't include the
    borders around the views."
    dropWindowBounds := dropWindowBounds insetBy: -1 @ 0.
    (monitorRectangle corner y >= dropWindowBounds corner y)
        ifTrue: [intoMonitor := dropWindowBounds amountToTranslateWithin: monitorRectangle]
        ifFalse: [dropWindowBounds := dropWindowBounds translatedBy: 0@(dropWindowBounds height + parentDisplayBox height) negated.
            intoMonitor := dropWindowBounds amountToTranslateWithin: monitorRectangle].
    dropWindowBounds := dropWindowBounds translatedBy: intoMonitor.
    ^dropWindowBounds


David Buck wrote:
I'm seeing the same effect as you but that's a separate problem from the one I'm reporting.  I'll break it down to individual steps to make it clear:

Case 1 (normal case)
    - Move the Combo Box Test window to a point near the top of the screen
    - Press DOWN and hold with the left mouse button on the input field
       - a list appears below the cursor
    - Release the mouse button without moving the mouse
    - Move the mouse to a list item
    - Press DOWN again
    - Release
       - selected item is displayed in the list

Case 2 (unusual case)
    - Move the Combo Box Test window to a point near the BOTTOM of the screen
    - Press DOWN and hold with the left mouse button on the input field
       - a list appears but is centered under the cursor
    - Move the mouse holding the button down
       - Focus shifts to different list items
    - Release the mouse button
       - A list item is selected

Case 1 involves two mouse clicks - open the list then select an item.  Case 2 doesn't allow two clicks and does everything in one click.  Case 1 allows you to click on the scroll bar in the list and scroll. Case 2 doesn't allow you to use the scroll bar because releasing the mouse button selects an item.

Probably the best way to fix this is to have the combo box list appear completely above the combo box if there's not enough space to display it underneath.

David


Claus Kick wrote:
David Buck schrieb:
Normally when you click on a combo box, you can release the mouse button then click again tp select the item from the list or to scroll the list using the scroll bars.  If the combo box is near the bottom of the screen, however, it behaves differently.  As soon as you press the red mouse button on the combo box, it opens the list view and starts selecting.  As soon as you release the mouse button, it selects the item. You can't press, release, then click on an element in the list box or scroll using the scroll bars.


Hello, this sounded interesting so I tried to reproduce it (VW 7.6 NC). What I found is the following:

1. open the combobox test window
2. open the dropdown menu and select an item or not, but do not close the dropdownlist again
3. move the combobox test window somewhere
5. try to open the dropdown menu - this will not happen on first try, only on second try

This is what I think what happens:

If you move the window with the menu still being open, the dropdown menu is closed, but the dropdown state of the combo box is not updated.
Only if you "close" the "closed" menu and click again, it will be opened again.

Is this what you meant?

No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.830 / Virus Database: 271.1.1/2991 - Release Date: 07/09/10 02:36:00


_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.830 / Virus Database: 271.1.1/2991 - Release Date: 07/09/10 02:36:00


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc