March 28, 2024, 01:58:28 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Info Only Update - 07-30-2013

Started by LarryMc, July 30, 2013, 08:55:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

Got a design problem I don't know a good way to resolve.
The api I'm using to draw all the text basically has two ways to set it up with flags
1 - as a singleline which ignores any embedded "\n"
2 - like a multi-line edit control which will honor any "\n"

I'm controlling which way I display the text with the ellipsis command which also controls how the text looks when it is too long for the column.

When using style 1 the api allows me to center the text vertically in the cells - everything looks nice and neat

The only pro thing about style 2 is it allows multi line text to be displayed
There are several things I don't like when using style 2.
1) one cell in the entire grid with a "\n" will cause all the row heights to increase.
2) for all the remaining cells in the grid that don't have a "\n" the text will be at the top edge of the cell which looks bad FIXED
3) currently my hidden edit control is single line so when editing I can't see the "\n" (that's easiest enough to fix though) FIXED
4) the real problem is that I'm trapping the ENTER key so that when it is pressed the editing session is ended and the edited text is written to the cell. So I can't enter a "\n" unless I make it a SHIFT-ENTER type thing FIXED
5) if you have that one cell with 2 or more lines and then edit it to make it just one line the row heights won't shrink back down.  That's because of the time it would take to check the height of all the text in all the cells of the grid in order to see what the minimum height can be set to.

Getting rid of multiline text gives the cleanest looking grid and the easiest for me.

HOWEVER, one of the uses of the grid that had crossed my mind would be to use it as an image catalog
One column would be a thumbnail of the image and another column would be multiline text describing the image.
another would be to made an application that was a downloadable catalog that had pictures and descriptions.

Sooooo...  I'm going to see what I can do about centering the text.
And my recommendation would be to not use "\n"s in database type grid setups

May take me a while if I can "gitter-done". "I love it when a plan comes together"
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library