Results 1 to 5 of 5

Thread: Loading data into MLGrid Control

  1. #1

    Loading data into MLGrid Control

    I am new to thinbasic and am still evaluating its functionality as to suitability for my purposes.

    I am wanting to find out if the only way of loading data into the MLgrid is by using the MLGrid_Put command?

    Elsewhere on this forum i saw an example which parsed the FILE_Load(FileName) command to load data into an array.
    Can this be used to load the underlying array of the ML Grid?

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Hi RADRAD,

    welcome to thinBasic community forum.

    Yes, actually the only way to insert data into a MLGrid is using MLGrid_Put function.
    But if there is an interest, I can develop other ways, for example using arrays/bulk cells filling.
    If you can give a little more details I will see if I can develop some new general purpose functions on loading data.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #3
    Greets Eros,

    If I might offer a couple of thought/examples? My work has slowed some, due to health matters, but I'm trying to get things going again. And working with MLGrid would be a part of my efforts.

    Since I deal with elevation data and that data is formatted in a row/column manner, it's suited for work in MLGrid. But the data is dynamic in size and can come from 1 to 4 files, so I would be filling an array first. Once that array is filled, it would be nice to have a simplified call to MLGrid that would size it's array and populate the data. Something like MLGrid_Grab, which would be fed the array name and would recognize the array dimensions and I should correctly (?) refer to the array as a matrix, since it's multi-dimensional, then once MLGrid is sized all the matrix's data is read and placed into MLGrid. Then going back the other way, once I am through working the data in MLGrid, having a MLGrid_Store to move the contents back into the matrix.

    As I understand the workings now, I would have nested loops going into MLGrid and back out of MLGrid to accomplish the transfer of data. That's OK, except when my loops get out of whack and I spend time fixing my boo-boo's.

    If I can get the "most important" sub-routine to work, then I can develop the tools that will be using MLGrid. And there will almost certainly be a whole lot of questions when I get to that point!

    Thanks,

    Lance

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Thanks Lance,

    I think I can do something on this side.

    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Similar Threads

  1. MLGrid: new sheets functionality
    By ErosOlmi in forum UI (User Interface)
    Replies: 0
    Last Post: 06-09-2011, 11:30
  2. MLGrid for evaluating formulas
    By Petr Schreiber in forum Sources, Templates, Code Snippets, Tips and Tricks, Do you know ...
    Replies: 0
    Last Post: 27-01-2009, 14:04
  3. Data trigger and data events
    By ErosOlmi in forum TBEM module - thinBasic Event Manager module
    Replies: 9
    Last Post: 10-10-2008, 22:54
  4. TBGL_LoadTexture and loading
    By Michael Clease in forum TBGL General
    Replies: 13
    Last Post: 03-06-2007, 12:29

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •