IonicWind Software

IWBasic => IWGrid => IWGrid Development => Topic started by: LarryMc on October 08, 2011, 09:56:07 AM

Title: IWGrid Development Updates
Post by: LarryMc on October 08, 2011, 09:56:07 AM
With this first update the grid has an optional title as well as optional row and column headers.
One cell has been preloaded with some text.
clicking on the cell puts it in edit mode.
the cell is actually configured as a numeric only cell.

hit ESC key to abort edits
to save edits
   hit ENTER key
   click any other cell
   use the scroll bars

when there is no cell currently in edit mode the arrow keys will move the selection box and ultimately cause the grid to scroll.
the colum dividers in the header can be dragged to change the width of a column
There's a bug right now with that. Pressing the mouse button to drag the coulmn width causes the currently hi-lighted cell to go into edit mode.

Right now you have to click the cell to enter edit mode.
Should the ENTER key also open the currently hi-lighted?
Should the click only select a cell and not put it in edit mode?
If a user just wants to copy the contents of the cell it HAS to be in edit mode.

LarryMc
Title: Re: IWGrid Development Updates
Post by: billhsln on October 08, 2011, 09:38:33 PM
Very impressive....

Bill
Title: Re: IWGrid Development Updates
Post by: jerryclement on October 09, 2011, 05:47:15 PM
 ;D
Very nice Larry!

Can you only enter numbers in a cell?
I could not enter alpha characters.

Jerry
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 09, 2011, 07:31:51 PM
Quote from: jerryclement on October 09, 2011, 05:47:15 PM

Can you only enter numbers in a cell?
I could not enter alpha characters.

Jerry


One of the key requirements of the grid designed required that the sub classing of an edit control work.(for the various mask to work.)

So, in my experimenting to see if I was going to attempt building yhe grid I subclassed to accept only numbers.

LarryMc
Title: Re: IWGrid Development Updates
Post by: jerryclement on October 10, 2011, 07:24:13 AM
 :)
Thanks for the info Larry, I am really following your progress as this is a very useful app.
Jerry
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 10, 2011, 07:28:04 AM
right now I'm hung up on getting the protectcell and protectgrid flags to play pretty when opening a cell and making the controlenable command make the edit control in the cell respond correctly.

I've got a pretty big rats-nest of code right now.

LarryMc
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 10, 2011, 07:11:37 PM
Got my cell and grid protection issues resolved.
The 'grid protect' is the basic layer.
Turning this flag on and off controls all cells in the grid that haven't been assigned an individual protection status.

The "cell protection" is the top layer.
Cells may be designated as protected or unprotected.
These individual settings override the current "grid protect" flag.

Cells that typically would be individually protected would be labels.
Unprotected cells would be for user input.

If a cell is protected(either individually or with the "grid protect") and a user clicks on the cell the edit window will appear but the edit control will be disabled.
This is to allow the user to be able to highlight and copy the contents of the cell.

I'm now going to work on the scheme for setting the different types of cells.

LarryMc
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 11, 2011, 06:09:58 AM
Okay, got my scheme for identifying and handling different types of cells worked out.
I structured it so I COULD have up to 100 different types of cells.

The attached is an example of where I'm at right now.
The left column entries are protected alphanuric entries.  They can't be changed by the user. They are labels.
the right column contains unprotected cells of the types indicated.
they can be edited by the user as long as the grid is not protected.
The checkbox in the upper left corner of the parent window allows you to toggle the protected state of the grid.

Comments are welcome.
Put any wish list items in the wishlist post to keep them together.

LarryMc
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 11, 2011, 07:03:20 AM
on the previous demo I accidently left cell 3C protected and I shouldn't have.

NOTE: the protection state of the grid is check only when a cell is first open for editing.
if you toggle the grid protection while a cell is open for editing the editing process continues with the state the grid was in when the edit started.

LarryMc
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 12, 2011, 09:49:52 AM
Got the combobox working, will now work on the checkbox

LarryMc
Title: Re: IWGrid Development Updates
Post by: Brian on October 13, 2011, 04:45:18 AM
Larry,

That looks really good - who's a clever chappie? I wouldn't know
where to start with something like that!

Are you thinking of adding simple formulas, something like adding a
column or row up, simple calculations like that?

Brian
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 13, 2011, 05:17:13 AM
Quote from: Brian Pugh on October 13, 2011, 04:45:18 AM
Are you thinking of adding simple formulas, something like adding a
column or row up, simple calculations like that?

In this topic (http://www.ionicwind.com/forums/index.php?topic=4756.msg36863#msg36863) I wrote this:
QuoteAnd if I can get all that done I'll tackle functions like adding a group of cells.
It's there but its at the bottom of the list. ;)

LarryMc
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 13, 2011, 06:06:46 AM
checkbox now works

going to tackle the combination of an edit cell that is accompanied with a button to call a subroutine

LarryMc
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 13, 2011, 09:28:31 AM
That was easier than I thought!

I got the combination edit/button cell to work.

when you click the ell and put it in edit mode a button appears at the right edge
you have the option of typing in the edit portion or clicking the button to call a user defined function.

When the button is clicked the contents of the edit window is passed to the user's routine and the string returned from the user's routine is placed in the edit window.

In the demo I used this as my user subroutine:
sub test(string d),string

return "Made ["+d+"] it!"
endsub


It will be a while before I post another update.
I'm going to start working on edit field mask. (Along the lines of a USING statement in results)

wish me luck ;)

LarryMc
Title: Re: IWGrid Development Updates
Post by: whitenite1 on October 13, 2011, 09:28:36 PM
LarryMc
  I would like to be the first to extend a "Good Luck" though I don't think 'Luck' has anything to do with your programming talent. When you got it, you got it!!

whitenite1
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 13, 2011, 11:52:27 PM
you'd be surprised how much of this stuff I don't know.

right now, I could not write a program, from scratch, that had a main window with one of each of the available controls.
I've built up a rather large stockpile of bits and pieces of code I've used over the years; I'd be lost without the IDE "find in files" tool, and I look at the help file almost hourly.  Did I mention searching the IW forums AND the old Pyxia forums disk.

But I'm hell on wheels when it comes to cutting and pasting various pieces together ;D.

LarryMc
Title: Re: IWGrid Development Updates
Post by: Rock Ridge Farm (Larry) on October 14, 2011, 07:24:35 AM
Some of the best programmers I ever worked with were cut/paste programmers.
It is a wise man who can see the end result and find the bits to put together to acheive
it.

Larry
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 18, 2011, 08:16:46 AM
just to let ya'll know I'm still plugging away.

I'm basically working on a Masked Editor control to incorporate into the
Grid control.

I've got some of it working to some extent right now.

The attached demonstrates 4 of the types, so far. 
I'm working on the cut and paste aspects right now.

LarryMc
Title: Re: IWGrid Development Updates
Post by: Brian on October 18, 2011, 12:02:01 PM
Larry,

Forgive my ignorance, but what is an SSN?
And will you be able to change the telephone mask properties? They may
work for you, but not for us on this side of the Pond!

Brian
Title: Re: IWGrid Development Updates
Post by: whitenite1 on October 18, 2011, 12:13:44 PM
Larry..
  I am only able to enter 6 digits of the phone number, after the area code.

Brian Pugh..
The SSN is the Social Security Number. I think that's used also, only on this side of the pond.

whitenite1
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 18, 2011, 01:25:43 PM
Quote from: whitenite1 on October 18, 2011, 12:13:44 PM
  I am only able to enter 6 digits of the phone number, after the area code.
It doesn't like the embedded space after (xxx).  I'll have to look into it.

@Brian - yes SSN is the US social security identification number format.

I started out thinking I would make a mask for each type I could think of and/or people asked for.

I guess what I really need to try to do is make it universal to let people design their own mask.

LarryMc
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 19, 2011, 10:06:16 AM
Got the basic currency mask working.
With the way the code is written the max positive number it will handle is $1,999,999,999.99. (Haven't checked the max negative yet.)

Got to address cut/paste also.

LarryMc
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 20, 2011, 10:55:58 AM
Quote from: LarryMc on October 19, 2011, 10:06:16 AM
With the way the code is written the max positive number it will handle is $1,999,999,999.99. (Haven't checked the max negative yet.)

Limitation was being imposed by a combination of the STR$ and VAL commands.
I coded a work-around since I was using it only to strip leading blanks from the number.

LarryMc
Title: Re: IWGrid Development Updates
Post by: billhsln on October 21, 2011, 01:28:51 AM
Have you tried the USING to return fancy numerics, instead of STR$ and VAL?

Bill
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 21, 2011, 07:05:25 AM
Quote from: billhsln on October 21, 2011, 01:28:51 AM
Have you tried the USING to return fancy numerics, instead of STR$ and VAL?

Bill
Yes, but it didn't serve my purpose in this particular case.

LarryMc
Title: Re: IWGrid Development Updates
Post by: DominiqueB on October 21, 2011, 09:26:47 AM
Thank's it lokks interesting !

Could you add to formatting, values.
I mean for example, IP are 4 numbers separated by . each of values comprised of numbers between 0 to 255

This is just an idea for developpement .

Dominique
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 21, 2011, 09:41:12 AM
Right now the example has it dummied up for 2 digits in each section but will be changed for 3 digits in each section.
So the answer to your question is yes.

LarryMc
Title: Re: IWGrid Development Updates
Post by: LarryMc on November 08, 2011, 11:20:26 AM
I haven't given an update on my progress and there may be a few of you who wonder where I'm at.

I had put the grid control on the back burner while I worked on the masked edit control which I need for the grid control.

Now I have put the mask edit on hold while I help LarryS work on the new IDE for IWB3 since the IDE is the only thing keeping him from releasing the new version of the compiler which has 64 bit capability.

So, when we get through with that then I'll retun to where I was at on the mask edit.

LarryMc
Title: Re: IWGrid Development Updates
Post by: LarryMc on October 19, 2012, 09:09:54 PM
In a few weeks it will be a year since I last worked on this.

I really wish I was working on it now instead of the help file for the new IDE.

Oh well, some days it's checken and some days it is feathers
Title: Re: IWGrid Development Updates
Post by: LarryMc on November 15, 2012, 12:07:19 AM
One other thing I failed to mention about the grid control.

When I get through with all the functions I currently plan for IWGrid I have another significant idea.

I will use what I can from IWGrid to create another grid control to use for databases.
The basic version would be just for displaying the contents of a db file table.
You would past the db name table name, and type of driver and screen size of control and it would figure out the columns and basically set up a browser for the db.
From there add configuration options:
to select columns to show
column formatting
column headings (custom or table column headings)
allow sorting
allow searches
lastly, allow editing.

you'll be able to have multiple controls to multiple tables.

The main point is to make displaying a database as simple and as quick as possible.

That's considering I don't go totally senile first. ;)

Title: Re: IWGrid Development Updates
Post by: billhsln on November 15, 2012, 08:51:47 AM
I know I will be interested in the Grid Control and the one that works with DataBases. 

Will be waiting with baited breath (what ever that means).  Have heard the phrase said for years, never did make any sense.

Hope you get the time to work on it.

Bill
Title: Re: IWGrid Development Updates
Post by: LarryMc on November 15, 2012, 09:02:30 AM
Quote from: billhsln on November 15, 2012, 08:51:47 AM
I know I will be interested in the Grid Control and the one that works with DataBases. 

Will be waiting with baited breath (what ever that means).  Have heard the phrase said for years, never did make any sense.

Hope you get the time to work on it.

Bill
It was something I helped you with that gave me the idea I might be able to pull it off (on the database part)
Title: Re: IWGrid Development Updates
Post by: billhsln on November 15, 2012, 09:10:57 AM
My guess would be the program I was writing for my Grandson to keep track of his Pokemon cards.

Bill
Title: Re: IWGrid Development Updates
Post by: LarryMc on June 11, 2013, 05:44:13 PM
Today I spent some time getting back up to speed on the Masked Edit I need for the grid.
I think I'll make it so it can be used standalone without the grid.
Title: Re: IWGrid Development Updates
Post by: LarryMc on June 21, 2013, 06:48:10 AM
Well, after being sidetracked for 19 months I'm back to working on the IWGrid control.

I think I'm going to spend time documenting (rough help file) what I've got done so far and update it as I go instead of trying to write it after the fact.