April 19, 2024, 12:05:49 AM

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 - 10-07-2013

Started by LarryMc, October 07, 2013, 04:07:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

After a while of working on the 2.5 IDE and IWB+ I am now back to working on the grid control.

Even though I haven't been working on it it doesn't mean I haven't been thinking about it.
I've still to complete the recoding for the auto width and height functonallity.
I've also decided that I can solve my editing real estate issues by moving away from turning a cell into a\n edit control like I do now and making it a dialog.
That will solve my issues with multiline controls.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

finished the rework of the code for the column headers, mentioned in previous post.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Happy to test, Larry, while I am still working with the grid control

Still can't get a grid window to size properly. If there is only one line, it fits perfectly.
Add lines until the scrollbars appear right and bottom, however, and the grid window
does not fit. Does spoil it somewhat

Brian

LarryMc

Quote from: Brian Pugh on October 16, 2013, 01:34:04 PM
Happy to test, Larry, while I am still working with the grid control

Still can't get a grid window to size properly. If there is only one line, it fits perfectly.
Add lines until the scrollbars appear right and bottom, however, and the grid window
does not fit. Does spoil it somewhat

Brian
can you post me a screenshot of what you are calling "the grid window does not fit"?
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Brian
There are multiple problems.  Some mine, some yours.
The first I spotted is yours and is easy to take care of.
You don't need to calculate the size of the last column.
If any portion of the last column can be seen it will automatically be stretched/shrunk to fit properly.
When you do the calculation to size it you have to hit it right on the money and also you have to manually determine if scrollbars are present and adjust for that in your calculation.
If you force the size of the last column then you wind up firing the scroll bar at the bottom of the grid if you are a pixel to big.(which is showing my problem)

So to fix your portion of the problem just delete these two lines of your code"
lastCol=width-872
IWG_SetColWidth(win,501,8,lastCol)

The way the grid was originally coded the height of the grid was automatically changed to make the last line always be a full line.  I didn't like that because if you had other stuff in the window besides just the grid(like a text note just below the grid) it could be written over at run time or the spacing could appear different.
I decided I wanted the height of the grid to remain the size defined by the user even if it meant showing partial lines(in height like an edit control).
Your program is showing me that I still have work to do on that code.

Your 8 line example with your last column calculation  in tact will be a good test for me while I try to fix that remaining height code problem.
thanks
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library