Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 arrow in focused Cell Collapse All
Subject Author Date
David Skok Feb 23, 2007 - 2:49 PM

Is it possible to add the focus arrow to a cell. I’m referring to the arrow that can be turned on for row headings in CExtGridWnd, not the mouse cursor. If it is an Icon and you tell me how to get it I can probably figure out the rest.

Thanks

Technical Support Feb 24, 2007 - 12:24 PM

It is possible to make outer grid cells displaying the focus arrows for the focused row and or column like you can see in the grid controls in the SimpleGrids sample application. You should simply mark the header cells to let them know that they should display focus arrows automatically when appropriate row/column become focused:

      pHeaderCell->ModifyStyle(
            __EGCS_HDR_FOCUS_ARROW_RESERVE_SPACE // reserve space for the focus arrow when it should not be displayed
                  |__EGCS_HDR_FOCUS_ARROW_DISPLAY // display the focus arrow
                  //|__EGCS_HDR_ROW_COLUMN_NUMBER // uncomment this to make header cells displaying row/column numbers automatically
            );

David Skok Feb 24, 2007 - 8:53 PM

I want to display the the focus arrow in the inner cell that is focused. Is the focus arrow an an Icon that I could display in the focused cell?

Technical Support Feb 25, 2007 - 11:02 AM

This is not supported directly. You can however do this in following way. Any grid cell gets repainted when its focused state changes. This means you could use a custom cell class that implements the CExtGridCell::OnPaintForeground() virtual method. In this method, reset the cell icon depending on if the cell is focused and invoke the parent class’s method.