ITEMBOX - Clear Selection

Started by galaara98, August 15, 2014, 11:18:46 AM

Previous topic - Next topic

galaara98

I have an ItemBox that is tall enough to show say 25 items.   I allow Multi-Select (no sure if it matters, but thought I would state it)

Let say the Item box has 10 "Items" in it
Items = "sdfsdf" : @TAB : "#$sdf" , etc.

So the item box is showing about 15 "Items Worth" of blank space at the bottom
Now I Select an item (and later test selecting a few items)

Now I want to STOP selecting ANY items.

My intuition tells me I can just "Normal Click" in the empty area at the bottom of the list. 
But when I click in the "Empty Area", the ItemBox does not "Unselect all" as I had expected it too.

( I can test this "is this normal" theory in Windows Explorer, by navigating to a folder that has only a few items, then expanding the Explorer Window to be tall enough to show more than the available "Items", now select a file or two, and then Click on nothing below the files)

Currently to "bandaide" the situation, I have added a contextual menu to the ItemBox, with a "Clear Selection" named menuitem and execute DialogControlSet(Handle, "ControlName", 6,"") when the user chooses it

Have I misconfigured something to produce these results, and if not.. how does Wilson WindowWare feel about changing the ITEMBOX to match my expectations?

Aaron

td

The WinBatch Dialog 'ITEMBOX' control exhibits the default behavior for user32 listbox controls with regard to mouse click events in any empty area of this type of control.  There are several alternatives to using a context menu however.  The simplest may be to add a 'Clear Selection' button to your dialog or have one of an existing control's events clear the selection in your 'ITEMBOX'. 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

galaara98

Bummed, but acceptable :)
The context menu is not bad, I was just hoping for even better (for my users)

Aaron

td

I suppose you could add a bunch of blank items to your ITEMBOX. You would need to check for a blank selected item in your callback so you could cancel all selections.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

galaara98

hahaha.. honestly... that is not a terrible solution.  Not hard to implement, and would satisfy the requirement...

Interesting.... interesting..

Aaron