Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - Giving multi-select tree focus loses selection
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Giving multi-select tree focus loses selection

 Post Reply Post Reply
Author
Message
Norbini View Drop Down
Newbie
Newbie


Joined: 23 January 2014
Location: Cambridge, UK
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Norbini Quote  Post ReplyReply Direct Link To This Post Topic: Giving multi-select tree focus loses selection
    Posted: 30 January 2014 at 8:20am
Hi,

  I'm trying to work out if the Toolkit Pro Controls (for MFC) CXTPTreeCtrl is a suitable replacement for a home-grown multi-select tree control that isn't working correctly. My app runs on Windows 7 and XP.

  In my application, it is normal for the tree control to lose focus as the user interacts with other controls in a window. However, I'm finding that with the CXTPTreeCtrl, when the user clicks to give focus back to the tree, any previous multiple selection is lost and only a single item will then be selected. This happens when clicking on either a blank area under all tree items (if available), or to the right of any tree item labels. It can be avoided only by clicking on a very thin (1 pixel?) border around the entire control - this is much too tricky to expect the user to do.
  The problem is made slightly worse on Windows 7 because the grey colour used for selected items when the control has lost focus (when TVS_SHOWSELALWAYS is enabled) is very faint, and so is almost invisible, making it look like no items are selected when the tree control does not have focus.

  I'm wondering if there is a way to:
    a) Change the colour of the highlight when the control has lost focus. This way is might be more obvious to the user that they might change the selection when clicking.
    b) Prevent clicks on the background of the tree control from losing the selection (at least when giving focus back to the control).

  Any help on these matters would be very much appreciated.

  Many thanks in advance,
    -Nige
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.