Author Topic: drawgrid() and grid()  (Read 96 times)

0 Members and 1 Guest are viewing this topic.

ABer

  • Administrator
  • Hero Member
  • *****
  • Posts: 730
    • View Profile
drawgrid() and grid()
« on: November 20, 2022, 10:44:45 AM »
Hi there - I am trying to find the best way to display tabular information (e.g. Hellenistic Lots). I was experimenting with grid() and drawgrid() but I couldn't see how to include planet glyphs and sign glyphs.

Is this possible within these frameworks? I think using a grid would be quite a good way to display this sort of information.

Thanks. Ed

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 764
    • View Profile
Re: drawgrid() and grid()
« Reply #1 on: November 20, 2022, 11:33:35 AM »
You can see both grids in action in horoscope data. The drawgrid is what you see, and Csv does a normal grid. They both have good and bad points. The drawgrid is a bit more difficult because you have to manipulate the data array while the normal grid has many functions to add data and the latter also has a function to export to csv. The normal grid can't be on a form though, it is an independent control, a bit like canvas(). And there's good old text() where you can use tabs and have symbols.
Greetings from Groningen Netherlands <)))><.`.><(((>

ABer

  • Administrator
  • Hero Member
  • *****
  • Posts: 730
    • View Profile
Re: drawgrid() and grid()
« Reply #2 on: November 20, 2022, 01:14:26 PM »
Thanks Jean - I will take a look. Ed

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 764
    • View Profile
Re: drawgrid() and grid()
« Reply #3 on: November 20, 2022, 01:53:11 PM »
Forgot to say, big difference is in a drawgrid you can draw symbols, which you can't in a plain grid.
A normal grid is most useful when doing something like Csv, where you don't need symbols as you want data to be readable / usable everywhere and do copy / paste etc.
A drawgrid also somehow feels a bit clumsy to me, something to do with scrolling.
Edit: it's because you have to drag the slider quite a bit to have effect, i googled it a bit, it seems this is a bit of an oversight in that control. I looked at hacking into it but it's rather complicated. The filemanager in pd is also a drawgrid btw.
Greetings from Groningen Netherlands <)))><.`.><(((>