October 06, 2022, 07:53:46 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Info Only Update - 08-01-2013

Started by LarryMc, August 01, 2013, 09:14:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

I got sided track from rewriting the demo.
I decided I'd work on the grid's notification messages to the parent window.
When I got to the checkbox type cell I ran into a little problem.
The way I had it was that when you clicked on a checkbox cell to put it in edit mode it automatically toggled the checkbox.

The problem lied in the fact that whether or not it toggled depended on whether or not you clicked on the checkbox itself or just in the cell.
If you clicked in the cell but not on the checkbox it treated it like it had ended an editing session and that notification was sent along with a notification that a new selection was made.

My problem was that I couldn't make the checkbox control fill the entire cell.  That's because what ever size you make a checkbox the box itself is vertically centered on either the left or right edge of the rectangle. And I couldn't change the size of the checkbox itself. That would look really bad for the ckbox to be jumping from the center of the cell prior to editing then to the left or right edge when editing.  That's the way all the text and number cells work but they don't look that bad.

My only solution was to make the cb ownerdrawn and draw it my self.  Built myself a little test program for development after doing some research and just about have it working the way I want.  Before the weekend is over I'll have the new code merged into the grid library.

The notification messages will signal a particular event and a returned UDT that will identify the row and column of the cell that the event occurred in.  In that way the User can catch events to do something with the new data like update a file, perform some math on some cells when one changes etc.

As always, any comments or suggestions are welcome.

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

I've added 22 notification messages that are sent to the parent window + a utility function to decode the row/col for the current cell that the message came from.
Also added user commands to set/reset the state of a checkbox cell and to read the state of same.
When I get the help file updated I will update the download.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

While working on the new demos I discovered a major flaw.
If I change the dimensions of the grid (inc/dec the number of rows/columns) the grid will get smaller and smaller
With all the calculation hoops I'm jumping through I haven't been able to find where I'm going wrong yet.

Oh well....
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Resolved that size issue.  Back on track working on the new demos and examples.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Got a little sidetracked again.
I was daydreaming, thinking about possible uses for all this mess and decided I wanted a stand-alone button.
So now I have one.  It is automatically sized to fill a cell and clicking it sends a custom message to the parent.

The reason I had for adding this was something along this line.
I wanted a grid that filled a window with no caption but I needed a way to close the parent window.
Since I wanted the grid to fill the entire client area there was no place for a close button so... waa-laa.

With the built in cell text centering, colors, images and such I was thinking of
splash screens
properties window
possible messagebox substitute

Now, back to the docs and demos
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

while working on the last demo I decided I don't like what I'm doing with autowidth(which turns out to be autoheight also) and ellipsis, which in some cases are always there regardless of the setting and in other cases it controls whether or not embedded \n causes multiple lines to be shown or is ignored.  It's rather confusing to what is going on when.
I had more problems with those portions of the code than any other from the very beginning and it is obvious to me now that I need to spend some more time on that code.

I sure that the couple of ya'll that are interested in this control would like for me to get it "right" and easy to use and understand.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library