Print Page | Close Window

Handling Keyboard input....

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


Topic: Handling Keyboard input....
Posted By: Kevin6
Subject: Handling Keyboard input....
Date Posted: 19 September 2005 at 4:39am

Dear All,

I want to be able to have my control expand and collapse its contents on the key press by the user. Cntrl A and Cntrl D.

This is working fine if the CXTPPropertyGridView is collapsed as the top level window is getting the messages.

Once the contents of the CXTPPropertyGridView control are expanded it no longer gets the messages co-herently. It seems that all keyboard events are not directed to the CXTPPropertyGridView.

Other than subclassing - can anyone suggest a reasonable solution for catching keyboard events?

(Specifically - can I re-wire keyboard events to the parent class?)

regards

Richard.

 



-------------
Kevin.



Replies:
Posted By: Kevin6
Date Posted: 19 September 2005 at 10:22am

Well....as this forum was SO budding with ideas - I thought I would post back the result.

Subclassing the control didn't work as my code for expanding and collapsing the grid contents were held at the pane level.

The easiest solution was to track all keyboard presses that were handled by the Pane and then instruct the grid to Expand or Contract.

Using PreTranslate Message seems really robust... WM_CHAR was useless - OnCharToItem sort of worked (Expanded the grid but then when it lost focus you couldn't Collapse it)....

Rich



-------------
Kevin.



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