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 » CExtGridWnd Collapse All
Subject Author Date
Phillip Bernard Jan 30, 2008 - 1:47 AM

1.
Create CExtGridWnd with default styles.
Modify styles SiwModifyStyle(__EGBS_GRIDLINES | __EGBS_SFM_FULL_ROWS | __EGBS_MULTI_AREA_SELECTION);
Try select some rows with SHIFT key - row selected but not redraw.
If I add SiwModifyStyle(__ESIS_STH_PIXEL|__ESIS_STV_PIXEL) the selection redraw successfully.
Why ?

2.
Create CExtGridWnd with styles:
SiwModifyStyleEx(__EGBS_EX_HVI_HIGHLIGHT_ROWS|__EGBS_EX_HVI_EVENT_CELLS|__EGBS_EX_HVI_HIGHLIGHT_CELL);
There are all ok - hovered row highlights successfully.
Set to all cells BackColorSet(CExtGridCell::__ECS_NORMAL, SomeColorRef);
Highlights only one hovered cell.
Why ?

Technical Support Feb 2, 2008 - 1:07 PM

We analyzed your request in more details and found that both ways are enough close to each other. A new version of CExtGridCell::e_cell_state_t specifies a greater number of supported color types:

      enum e_cell_state_t
      {
            __ECS_ALL                                 = 0, // color in any state
            __ECS_NORMAL                                    = 1, // normal, not hovered, not selected, not highlighted
            __ECS_SELECTED                            = 2, // selected
            __ECS_HOVERED                             = 3, // hovered
            // next added in 2.83
            __ECS_HIGHLIGHT_PRESSING                        = 4, // pressed
            __ECS_HIGHLIGHT_BY_FOCUS                        = 5, // in the same row or column with focused
            __ECS_HIGHLIGHT_BY_SELECTION              = 6, // in the same row or column with selected
            __ECS_HIGHLIGHT_BY_HOVER                        = 7, // in the same row or column with hovered
      };
All these constants can be used in invocations of the CExtGridCell::TextColorGet(), CExtGridCell::TextColorSet(), CExtGridCell::BackColorGet() and CExtGridCell::BackColorSet() methods. You should simply set only the __ECS_NORMAL color instead of the __ECS_ALL color and highlighting will work like you requested.

Please send us an e-mail to the support mail box at this web site so we will provide you with the source code update.

Phillip Bernard Feb 1, 2008 - 5:53 AM

I’d prefer second way.
I think what changing cell’s background color in __ECS_NORMAL state must not influence to full row highlighting.

Technical Support Jan 31, 2008 - 4:26 AM

The scrolling strategy style should be applied to the grid window at least in one of directions: horizontal or vertical. This is really required by the current implementation of the grid windows.

If the background color is specified to some grid cell, then it really ignores highlighting. There are two improvements can be done in the grid window:

1) We can add support for additional cell colors that can be used during highlighting. Currently only normal, hover, selected and single persistent colors are supported.

2) We can make highlighted cells ignore their preferred colors.

We think first case is better, but which of them would you prefer?


Phillip Bernard Jan 30, 2008 - 1:52 AM

Prof-UIS v2.82
VS2008
Windows XP sp2