Announcement

Collapse
No announcement yet.

Spreadsheet

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

  • Spreadsheet

    Hello,

    I could only find one message in the archives regarding making a spreadsheet view for a database in PowerBASIC... He never got a reply, so I'm going to try again

    What I have at the moment , and it does work, is a grid of edit controls. I even have them changing size and adding and removing as necessary.

    1) I don't like it: Mickey mouse here we come!
    2) It is too slow when the number of edit controls get up there.

    Other than tackling a complete custom control from scratch I was wondering if anyone else had some ideas for this task. I would imagine that this would need to be done fairly often, so what do you guys do?

    Either way, after the more important parts of the system are together I'll be writing the custom control. Just looking for something to hold for a couple months.

    PS regarding other stuff for databases: If you haven’t seen it yet, there is the complete code in the Source Code Forum for an ARC4 encryption sub that encrypts at about 1.4MB per second on a 350 clock

    Thanks,
    Colin Schmidt

    -------------
    Colin Schmidt & James Duffy, Praxis Enterprises, Canada

  • #2
    Colin --

    There have been several recent discussions about this... Search the Third Party forum for "grid" instead of "spreadsheet" and you'll get lots of hits.

    If you are asking about "binding" a grid directly to a database, that is a much more advanced technique, but it is certainly possible. What kind of database are you using, and how are you accessing it? If you're using ODBC, binding a result set to a grid is relatively straightforward.

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>



    [This message has been edited by Eric Pearson (edited March 01, 2000).]
    "Not my circus, not my monkeys."

    Comment


    • #3
      Collin, instead of using individual edit controls for each cell,
      try painting your grid to the surface instead. Use TextOut api
      call to paint your text from an array of strings. When the user
      clicks on a cell, display an edit box in this cell and use
      it to modify this cell and when finished hide the edit box
      and update your string array and refresh the screen. To improve
      painting, you could just refresh that region.

      This would be my way of implimenting a grid.

      Regards, Jules
      Best regards
      Jules
      www.rpmarchildon.com

      Comment


      • #4
        Hello,

        All of the discussions on “grid” where dead-end as well if I want to keep it an all PowerBASIC app. Which I do.

        I also have a “no-budget”, so I’m not going to be purchasing any add-ons

        Jules Marchildon: That is along the lines that I was thinking of. Shouldn’t be too difficult. But, I thought by the time I wrote all that out, I could be half way done my own control…????

        If I wrote my own control in a couple of months from now, I'm guessing it would not be appreciated if I simply posted it in the source code forum for all to use. Third party guys might be upset?

        Thanks,
        Colin Schmidt

        ------------------
        Colin Schmidt & James Duffy, Praxis Enterprises, Canada

        Comment


        • #5
          Hello,

          I gave up on having the column width being adjustable for each field. The user now has to select how many columns they want to appear at a time if they want to change the size of the fields. Because I’m only adding and removing the controls when the window size actually changes, everything scrolls nice and smooth. I’m then trapping the movement keys (arrows, tab, shift tab, home, end, and so on) and moving the cursor around myself. It actually looks great and is very functional as long as the users are OK with not being able to change the column widths individually… That’s for version two

          Colin Schmidt

          ------------------
          Colin Schmidt & James Duffy, Praxis Enterprises, Canada

          Comment


          • #6
            Unless your code contravenes copyright or similar provisions, there is no reason why you can't post your source code. The "3rd party guys" will have to grin and bear it.




            ------------------
            Lance
            PowerBASIC Support
            mailto:[email protected][email protected]</A>
            Lance
            mailto:[email protected]

            Comment


            • #7
              I agree 100%! I would like to see your code!

              Well written PowerBasic applications can be valuable to others. Some people might be able to operate your application as you wrote it, while others may only need to modify it or extract pieces. Furthermore, every well written PowerBasic application is a great example for programmers learning PowerBasic.

              AND

              The other thing you can try, to improve the speed of updating
              so many controls, is to use BeginDeferWindowpos()/EndDeferWindowpos() api calls. You essentially loop thru all
              your edit controls (inside these 2 api calls), giving them an update and let windows paint them to the screen all at once.


              Thanks!
              Regards, Jules
              Best regards
              Jules
              www.rpmarchildon.com

              Comment


              • #8
                Hello,

                Give me a week or so to wrap up the whole thing (front and back end, maybe longer to do some testing first as well) and I’ll post the whole thing then. It will have it’s own network safe multi user table file format as well as being able to import and export CSV files. It will also be able to do a simple join (single matching keys) between tables.

                I’ll be posting it then copyrighted but as freeware for personal (non-business) use and as an example. If anyone was to use it though as is (front, back or both ends) with either no changes or only minor changes, as a product for resale under there own name, my starving student (not joking) bank account would appreciate some help

                Colin Schmidt,

                --------------
                Colin Schmidt & James Duffy, Praxis Enterprises, Canada

                [This message has been edited by Colin Schmidt (edited March 02, 2000).]

                Comment

                Working...
                X