Print Page | Close Window

Giving multi-select tree focus loses selection

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=22184
Printed Date: 24 November 2024 at 7:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Giving multi-select tree focus loses selection
Posted By: Norbini
Subject: Giving multi-select tree focus loses selection
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net