Grid?

BlitzMax Forums/MaxGUI Module/Grid?

Arowx(Posted 2009) [#1]
Hi I belive there is not currently a grid based control in MaxGui!

So what would be the simplest/best way to create a flexible grid of controls, that would allow data manipulation and refresh from a datasource e.g array or database table?

For example a grid that would allow a variety of controls with a flexible row/column count, e.g larger than display


Brucey(Posted 2009) [#2]
Use a canvas and implement a grid UI yourself ?


Arowx(Posted 2009) [#3]
And re-write all that code for text,list/comboboxes! I was thinking more along the lines of an object that would be an array of gadgets, and interested to hear peoples ideas on best approaches/potential problems?


Brucey(Posted 2009) [#4]
I was thinking more along the lines of an object that would be an array of gadgets

I suppose that's possible, and a lot of work too, I imagine.

In the end, you should hopefully end up with something like this :


:-)


Arowx(Posted 2009) [#5]
Yeah exactly!

How many lines of code to do that?

But alas MaxGui really does need a Grid control just so people who throw little apps together can have fun, without having to learn a whole new GUI api!


Brucey(Posted 2009) [#6]
About 4 or 5 lines to create the grid (in this case with the ability to "split" into different views. Otherwise you can create it with one function call).

Then calls to set cell values etc...

But alas MaxGui really does need a Grid control just so people who throw little apps together can have fun

It's been asked for many times, but as yet nothing much has come out of the requests.


Arowx(Posted 2009) [#7]
Is that becuase grid controls are not 'native' controls provided by the OS?


Brucey(Posted 2009) [#8]
No, it's because implementing a generic interface to use them on all of the supported platforms is a big job.


xlsior(Posted 2009) [#9]
There are some snippets in the code archives that allow basic grids, but they all have some limitations on what you can do with them.

built-in grids really are a major missing piece in MaxGUI at the moment...


degac(Posted 2009) [#10]

built-in grids really are a major missing piece in MaxGUI at the moment...


I agree, and I add ListBox with Multi Coloumn support will be a nice addition too...

PS: for Windows only there's an Hack to allow the use of MultiColoum support on Listbox


xlsior(Posted 2009) [#11]
PS: for Windows only there's an Hack to allow the use of MultiColoum support on Listbox


But it too still has some limitations -- e.g. you can only use images in the left-hand column. Better than nothing, but it would be nice if MaxGUI were to support them in full.


Brucey(Posted 2009) [#12]
That's right. A multicolumn list box is not a grid.