panwid icon indicating copy to clipboard operation
panwid copied to clipboard

architecture overview of datatable

Open dotnwat opened this issue 7 years ago • 1 comments

Hi, this project is awesome. I was looking for a table for urwid and stumbled across this. I've been looking through the code for a little bit, but was still a little uncertain about the basic architecture of the datatable.

That is, what is hierarchy and composition of the urwid components (e.g. list of columns, etc...). Would you mind describing this a little bit? Thanks.

dotnwat avatar Mar 31 '18 03:03 dotnwat

I have used this lib, from my view you need:

  1. Define your Columns as list, eg: name, label, how to sort, etc https://github.com/tonycpsu/panwid/blob/master/examples/datatable.py#L62
  2. Implement query(), this defines how do you get your rows: https://github.com/tonycpsu/panwid/blob/master/examples/datatable.py#L126

laixintao avatar Apr 10 '18 06:04 laixintao