Announcement

Collapse
No announcement yet.

My Little Grid updated to Version 1.08 - Workbooks

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • My Little Grid updated to Version 1.08 - Workbooks

    I just uploaded updates of My Little Grid (Version 1.08) to my website.

    The big news here is the addition of Workbooks and individual cell formatting. The programmer is allowed 255 separate sheets (freeware version just 3 sheets) which can all have their own grid size. This is perfect for loading multiple tables of a database into one grid. The Workbook has an Excel flavor to it which should make its response intuitive. Tabs can be colored and moved.

    Also numeric fields can be displayed in very flexible formats (using Powerbasic's FORMAT$ function)

    Version 1.08 also introduces Format Overriding which allows some formatting to the individual cell level. This may be handy in making one sheet a reporting sheet off the other sheets in the workbook.

    Attached is a thumbnail screen shot of a workbook along with a working example of some of the new features. The Total sheet is a read only sheet which calculates sums from other sheets. This has a hint of a spreadsheet in it.

    My Little Grid comes in two versions. The demo version is freeware which allows for 26 columns and 5000 rows in grid. This may be all many of the users need so feel free to use this version as you wish. The purchased version allows for 256 columns and 2,000,000,000 rows and only costs $35.

    My Little Grid is meant to be an easy to use, basic grid with databases in mind. With Workbooks, it is now an unbelievable value. Please take it for a spin around the block. If you are a paid user, grab the zip file password and have fun with this new version.

    http://www.psoftsol.com/mlg.html


    and to purchase

    https://www.regsoft.net/regsoft/view...roductid=77481
    Attached Files
    Last edited by james klutho; 6 Sep 2008, 05:55 PM.

  • #2
    Very nice!

    I like the workbook tabs.

    Good job James.
    Chris Boss
    Computer Workshop
    Developer of "EZGUI"
    http://cwsof.com
    http://twitter.com/EZGUIProGuy

    Comment


    • #3
      Thanks Chris

      I hope people find it useful.

      Jim

      Comment


      • #4
        Hi Jim,

        Do you have a PayPal account that I can transfer the funds to for the purchase?
        Paul Squires
        FireFly Visual Designer (for PowerBASIC Windows 10+)
        Version 3 now available.
        http://www.planetsquires.com

        Comment


        • #5
          How does the licence work? If I wanted to distribute it "inside" a product?

          Comment


          • #6
            Hi Chris

            You are free to distribute the dll in any product. Licensing is generous. Do as you like. I hope you find My Little Grid useful.

            Regards
            Jim

            Comment


            • #7
              Just noticed that a couple of routines I use did not make it into the include file. One of them copies a selected blocks of rows to the clipboard to be pasted into Excel (visible columns only) and the other hides a selected block of columns. I upload a new demo with these additions to both the include file and the help file. If you don't feel like re-downloading the demo file, simply paste this code into your MLG_PBDLL.inc file. I think it is pretty self explanatory.

              Code:
              SUB MLG_CopyRowBlockToClipBoard(hGrid AS LONG,OPT BYVAL CopyColHeader AS LONG,OPT BYVAL AllowAllRowsCols AS LONG)
                  LOCAL startblock,endblock AS LONG
                  LOCAL totrows,totcols AS LONG
                  LOCAL flag,I,x,y,rowlimit,skey AS LONG
                  LOCAL mystr AS STRING
                  LOCAL stLen AS LONG, hData AS LONG, hGlob AS LONG, mg AS LONG
              
                 #IF %DEF(%WINAPI) 'This sub require WINAPI
                  rowlimit = 5000   'Adjust to suit.  This prevents accidently trying to copy 2,000,000,000,000 rows
              
                  SendMessage hGrid ,%MLG_GETROWCOLTOTEX,VARPTR(totrows),VARPTR(totcols)
                  flag = SendMessage (hGrid, %MLG_GETROWCOLALLBLOCKSEL, 0 ,0)
                  IF flag = 1 AND AllowAllRowsCols <> 0 THEN 'The whole grid has been selected - this could be a problem with selecting many NULL rows
                     startblock = 1
                     endblock = totrows
                    ELSE   'The whole grid is not selected so check for a row block being selected
                      SendMessage hGrid ,%MLG_GETROWBLOCKSELEX,VARPTR(startblock),VARPTR(endblock)
                  END IF
              
                  IF startblock > 0 AND endblock > 0 AND (endblock - startblock) < rowlimit THEN
                     'Only copy visible columns
                     DIM widths(totcols) AS LONG
                     mystr=""
                     FOR I = 1 TO totcols
                       widths(I)=SendMessage(hGrid,%MLG_GETCOLWIDTH,I,0)
                     NEXT I
              
                     IF CopyColHeader > 0 THEN
                        FOR x= 1 TO totcols
                           IF widths(x) > 0 THEN
                               mystr=mystr & MLG_Get(hGrid,y,x)& $TAB
                           END IF
                         NEXT x
                         mystr=mystr & $CRLF
                     END IF
                     MOUSEPTR 11 'Hourglass - this needs a progress bar like MS Access
                     FOR y = startblock TO endblock
                         skey=GetKeyState(%VK_ESCAPE) AND &H8000
                         IF skey<>0 THEN EXIT SUB
                         FOR x= 1 TO totcols
                           IF widths(x) > 0 THEN
                               mystr=mystr & MLG_Get(hGrid,y,x)& $TAB
                           END IF
                         NEXT x
                         mystr=mystr & $CRLF
                     NEXT y
                     MOUSEPTR 1 'Arrow
                  END IF
              
              
                  stLen = LEN(mystr)
                  ' Create a global memory object and copy the data into it
                  hData = GlobalAlloc(%GMEM_MOVEABLE OR %GMEM_DDESHARE, stLen + 1)
                  hGlob = GlobalLock(hData)
                  mg = STRPTR(mystr)
                  MoveMemory BYVAL hGlob, BYVAL mg, BYVAL stLen
                  GlobalUnlock hData
              
                   ' Open the clipboard
                  IF ISFALSE (OpenClipboard(%NULL)) THEN
                      GlobalFree hData
                      EXIT SUB
                  END IF
              
                  ' Paste the data into the clipboard
                  EmptyClipboard
                  SetClipboardData %CF_TEXT, hData
                  CloseClipboard
               #ENDIF
              
              END SUB
              
              SUB MLG_HideColBlock(hGrid AS LONG)
                  LOCAL startblock,endblock AS LONG
                  LOCAL totrows,totcols AS LONG
                  LOCAL flag,I,K AS LONG
              
                  SendMessage hGrid ,%MLG_GETROWCOLTOTEX,VARPTR(totrows),VARPTR(totcols)
                  flag = SendMessage (hGrid, %MLG_GETROWCOLALLBLOCKSEL, 0 ,0)
                  IF flag = 1 THEN 'The whole grid has been selected - this not allowed
                     startblock = 0
                     endblock = 0
                    ELSE   'The whole grid is not selected so check for a column block being selected
                      SendMessage hGrid ,%MLG_GETCOLBLOCKSELEX,VARPTR(startblock),VARPTR(endblock)
                      IF startblock > 0 AND endblock > 0 THEN
              
                         FOR I = startblock TO endblock 'Do not temporarily hide a column already at zero width
                           K = SendMessage(hGrid,%MLG_GETCOLWIDTH,I,0)
                           IF K <> 0 THEN SendMessage hGrid,%MLG_HIDECOLUMN ,%MLG_HIDECOL,I
                         NEXT I
              
                      END IF
                  END IF
              END SUB
              Regards

              Jim

              Comment

              Working...
              X