Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

ELXTree Multiselect Behavior Changed

We recently updated to LMD2018 form 2017 and I found that the behavior of the Multiselect has changed. If you select 2 or more items and right click (to activate a popup menu) the tree unselects the tree nodes and selects the tree under node the mouse. In comparing the source code I found that you've commented out some code in the MouseDown method:

//            if Assigned(FOwner.FSelectedList) then
//              LNotSelected := FOwner.FSelectedList.IndexOf(LItem) < 0
//            else
//              LNotSelected := LItem <> FSelected;
            if {(LNotSelected or (FHitColumn <> LOldHitColumn)) and} // EB-2017: Condition removed
                                                                     // because of customer request.

Is there a way to program around this or can the code be fixed?

Thank you,
Mitch Wolberg
RockWare, Inc.
mitch@rockware.com

Comments

  • 4 Comments sorted by Votes Date Added
  • I reviewing the issue currently, and as you can see in code comment, for some other reason the code was commented out. So, I need to combine requirements, which takes time.
  • Hi,

    I changed the code to this: 

      LSelected := ((FOwner.FSelectedList <> nil) and
                    (FOwner.FSelectedList.IndexOf(LItem) >= 0)) or
                   (LItem = FSelected);

      if ([ssCtrl, ssShift] * Shift = []) and
         ((ssLeft in Shift) or not LSelected or (FHitColumn <>
          LOldHitColumn)) then
        FOwner.DeselectAll(FSelected <> LItem);

    So, the code will un-select rows on left mouse button click (this is required, becouse otherwise there will be no ways to unselect rows after selecting all rows), but will preserve selection on right mouse button click. Can you, please, modify sources and confirm, that this is Ok for your needs?
  • Looks good and appears to work.

    Thank you,
    Mitch Wolberg
    RockWare, Inc.
Sign In or Register to comment.