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 Tech Support » Focus bug in 2.85 Collapse All
Subject Author Date
Rado Manzela Jul 9, 2009 - 10:49 AM

After switch to 2.85 I’ve noticed bug. When I override CExtTreeGridWnd::OnGbwSelectionChanged(), when I call ItemFocusGet(), it returns previously focused item, not current one. It used to work in older prof-uis.

Technical Support Jul 12, 2009 - 5:15 AM

Yes, the standard tree control makes tree rows selected first (on left mouse button down) and only then focused (on left mouse button up). That��s why we changed behavior of tree grid’s focus/seletion.

Rado Manzela Jul 11, 2009 - 2:09 PM

I need to do something after selection changes, and use current selection and current focus (which is changed by selection change too) which is easier to do on one place. So is it by design of new version to change executing order OnSelection ... and OnFocus() ? Then I’m thinking whether it was necessary to break old code ;)

Technical Support Jul 11, 2009 - 11:49 AM

The answer is hidden in your message. The focus and selection is not the same. If you need to catch the selection changing event, then you should implement the OnGbwSelectionChanged() virtual method. If you need to catch the focus changing event, then you should implement the OnGbwFocusChanged() virtual method.