viewpoint-particle

Author Topic: ITEMBOX - Clear Selection  (Read 2709 times)

galaara98

  • Jr. Member
  • **
  • Posts: 50
ITEMBOX - Clear Selection
« on: August 15, 2014, 11:18:46 am »
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

  • Tech Support
  • *****
  • Posts: 2618
    • WinBatch
Re: ITEMBOX - Clear Selection
« Reply #1 on: August 15, 2014, 12:07:02 pm »
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'. 
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


galaara98

  • Jr. Member
  • **
  • Posts: 50
Re: ITEMBOX - Clear Selection
« Reply #2 on: August 15, 2014, 12:31:49 pm »
Bummed, but acceptable :)
The context menu is not bad, I was just hoping for even better (for my users)

Aaron

td

  • Tech Support
  • *****
  • Posts: 2618
    • WinBatch
Re: ITEMBOX - Clear Selection
« Reply #3 on: August 15, 2014, 12:50:22 pm »
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.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


galaara98

  • Jr. Member
  • **
  • Posts: 50
Re: ITEMBOX - Clear Selection
« Reply #4 on: August 15, 2014, 01:22:48 pm »
hahaha.. honestly... that is not a terrible solution.  Not hard to implement, and would satisfy the requirement...

Interesting.... interesting..

Aaron