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 » Grid in Dialog Has a Bunch of Blank Space Collapse All
Subject Author Date
Bill Olson Dec 6, 2011 - 3:37 AM



I’ve got another problem with my dialog with a CExtGridWnd on it.



I had a problem getting a continuous string of text to wrap and the rows to size the height properly.  I’ve solved that problem, but now if a cell has text with multiple lines formatted with \r\n for line breaks, the text doesn’t display correctly.  The text ends up cutoff in the cell with a bunch of blank lines at the bottom.  If I resize the cell enough, I can see all the data, but the size of the blank area at the bottom of the cell increases as I make it bigger.



The settings for the grid are:



    m_wndGrid.SiwModifyStyle(__ESIS_STH_PIXEL|__ESIS_STV_ITEM//|__ESIS_STH_NONE

        |__EGBS_RESIZING_CELLS_MASK|__EGBS_DYNAMIC_RESIZING,0,FALSE);

   

    m_wndGrid.SiwModifyStyleEx(__EGBS_EX_CELL_TOOLTIPS_OUTER|__EGBS_EX_CELL_EXPANDING_INNER

        |__EGBS_EX_CORNER_AREAS_3D|__EGBS_EX_CORNER_AREAS_CURVE|__EGWS_EX_USE_THEME_API|__EGWS_EX_PM_COLORS,0,FALSE);



    m_wndGrid.BseModifyStyleEx(__EGBS_BSE_EX_AUTO_BEST_FIT_COLUMNS,0,FALSE);



Each cell is formatted when data is inserted with:



    pCellStr->ModifyStyle(__EGCS_READ_ONLY|__EGCS_TEXT_ELLIPSIS);

    pCellStr->ModifyStyleEx(__EGCS_EX_NO_INPLACE_CONTROL_BORDER|__EGCS_EX_WRAP_TEXT);



This looks like some sort of setting of the style flags, but so far I haven’t been able to figure out the magic combination.



I have screen shots showing the problem, but I don’t see where I can directly upload an image here.



Bill

Bill Olson Dec 8, 2011 - 7:45 PM

I see what I did.  I accidentally put __EGCS_EX_MULTILINE_TEXT in the ModifyStyle function, not the ModifyStyleEx function.  Looking at the definition, the __EGCS_BUTTON_UPDOWN style and the MULTILINE style have the same value.  For some reason putting that style in the ModifyStyle function fixed the blank line issue, which I don’t think it should have.


Thanks,


Bill

Technical Support Dec 8, 2011 - 8:57 AM

You should remove the __EGCS_BUTTON_UPDOWN basic grid cell style.

Technical Support Dec 6, 2011 - 12:36 PM

You specified the __EGCS_EX_WRAP_TEXT extended style and forgot to specify the __EGCS_EX_MULTILINE_TEXT extended style. Additionally, the __EGCS_TEXT_ELLIPSIS basic style does not work with the __EGCS_EX_MULTILINE_TEXT extended style.

Bill Olson Dec 6, 2011 - 11:43 PM

I posted a replay, but it appears to have disappeared...


Adding __EGCS_EX_MULITLINE_TEXT worked, but now I have up and down arrow spinner controls in every grid box.  I experimented taking out the new flag and the spinner controls went away, so it is tied to the MULITLINE_TEXT flag.  How do I get rid of these spinners?


Bill