Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » How to change focus between two grid cell? Collapse All
Subject Author Date
mai mike Aug 14, 2007 - 8:16 AM

I have create a resizable control bar which has two pages(page1 and page2), and each page inclucde a grid cell which has the same base class derived from CExtGridWnd. To guarantee quick change between the single page over keyboard, these can be activated by key combination. With the key combination <Ctrl> + <1> the focus can be put on the page1, <Ctrl> + 2 the focus can be put on page2. With the focus on the pages, the following keyboard inputs are available:
(1) scoll with the arrow keys
(2) Shift and Ctrl for the production of a choice area

How can i implement this feature?

Thank you in advance!


Technical Support Aug 18, 2007 - 9:03 AM

You should override the CExtGridWnd::OnGbwAnalyzeCellKeyEvent() virtual method in your CExtGridWnd-derived class. Your method should detect needed keys combinations and perform focus changing adjustment. For all the other keys the parent class method should be invoked. The CExtGridWnd::FocusGet()/CExtGridWnd::FocusSet() methods allow you to get/set focused row/column. Actually we have no idea about what you mean by page1 and page2 in your message.