|
|
|
|
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.
Subject |
Author |
Date |
|
Henri Hein
|
Oct 14, 2010 - 9:21 PM
|
I have a CExtGridWnd in which items are added at the end on a user command. When the user invokes the command, I call EnsureVisibleRow() to scoll the item into view. This works fine, except the item is only barely scrolled into view. I would like the user to be able to see the whole item (row), not just the top portion of it. I have set the scrolling mode to __ESIS_STV_ITEM, which aligns the top item with the top border, which is what I want -- but I need EnsureVisibleRow() to scroll one more item, even at the risk of having some whitespace below the last item. I tried using __EGBS_BSE_EX_PROPORTIONAL_ROW_HEIGHTS as a workaround, but this made it worse, because this would ensure that only a single pixel of the last item would become visible after EnsureVisibleRow(). These are my styles modifications: SiwModifyStyle( __ESIS_STV_ITEM
|__EGBS_NO_HIDE_SELECTION //| __EGBS_RESIZING_CELLS_OUTER_H
|__EGBS_GRIDLINES|__EGBS_LBEXT_SELECTION |__EGBS_SUBTRACT_SEL_AREAS
|__EGBS_SFB_FULL_ROWS,
0, false);
SiwModifyStyleEx(__EGBS_EX_HVI_EVENT_CELLS |__EGBS_EX_HVO_EVENT_CELLS
|__EGBS_EX_HVI_HIGHLIGHT_ROWS
|__EGBS_EX_HVI_HIGHLIGHT_CELL
|__EGBS_EX_SI_HIGHLIGHT_ROWS,
0, false);
BseModifyStyle(__EGWS_BSE_WALK, 0, false);
//Make grid cells editable
BseModifyStyle( __EGWS_BSE_EDIT_AUTO );
BseModifyStyle(__EGWS_BSE_EDIT_CELLS_INNER);
BseModifyStyle(__EGWS_BSE_EDIT_SINGLE_FOCUSED_ONLY);
BseModifyStyle( __ENABLE_CELLEDITING_BSE_STYLES__ );
BseModifyStyleEx(__EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS); // | __EGBS_BSE_EX_PROPORTIONAL_ROW_HEIGHTS);
|
|
Henri Hein
|
Oct 15, 2010 - 5:54 PM
|
I stepped trough the code and noticed that the CExtScrollItemWnd had the wrong count in its cache. When I call SiwFireCacheChanging();
before setting the new focus, the issue seems resolved.
|
|
Henri Hein
|
Oct 14, 2010 - 9:22 PM
|
BTW, my prof-uis version is 2.80.
|
|