lib-ScrollingTable

lib-st in action!

lib-st provides a convenient way to create and display a scrolling table of data.
Supply column info and your table data, and you're off!

To get a handle in lua:

local ScrollingTable = LibStub("ScrollingTable");

To package in your addon, add to your .pkgmeta file:

externals:
    Libs/lib-st: 
        url: svn://svn.wowace.com/wow/lib-st/mainline/trunk
        tag: latest

Leave off the tag line if you want the absolute lastest alpha version from the site. (I try to keep a stable copy tagged as latest)

New Features:

Added support for calling SetData with a minimal dataset which can drastically reduce the number of tables that exist within the mod... at a slight cost to customization.

Other recent changes

If no args or colorargs are specified for value and color functions, respectively, instead of no args, these args will be passed:

function (data, cols, realrow, column, sttable)  
    -- sttable is a reference to the scrolling table
end

Here's some nitty-gritty:

  • Set names and widths of columns, lib-st will set the table width on it's own!
  • Set the number of rows, and a value to use for row height, lib-st will set the table height on it's own!
  • Set background colors for each column.
  • Set column text alignment.
  • Set column text color.
  • Set row text color.
  • Set text color on a cell-by-cell basis.
  • Supply functions to be evaluated for cell data, and cell/row/column text colors!
  • Filter table data via a filter funtion.
  • Table sorts are NON-DESTRUCTIVE. Data or the order of data supplied is never changed (unless modified by user supplied functions) for the display of the table. No copies of the data are made either. 1 Table, your data, sort it, index it as it was when it was created, update it as you see fit.
  • Hookable ui events. find out more here
  • Custom cell formatting with a custom display function
  • Enable selection on your scrolling table


Find out how to create a scrolling table using lib-st!
Let me know if you use it!!

-> Screenshots

Known consumers of lib-st

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of sapu94 sapu94 May 30, 2011 at 18:01 UTC - 0 likes

    Love the library. I have a ton of scroll frames in TradeSkillMaster and am slowly converting them all over to use this library as it's much easier to code and tweak and most importantly looks better :)

    Thanks

    Last edited May 30, 2011 by sapu94

    Lead Developer and Director of TradeSkillMaster | @Sapu94 on Twitter

    "A good programmer is someone who always looks both ways before crossing a one-way street." Doug Linder

  • Avatar of AcidWeb AcidWeb Jan 13, 2011 at 15:24 UTC - 0 likes

    I don't use SVN. I will include information about used libs in description in next update.

    Last edited Jan 13, 2011 by AcidWeb
  • Avatar of ddumont ddumont Jan 13, 2011 at 12:42 UTC - 0 likes

    No problem. Can you link to it properly in your addon's .pkgmeta file so that I get credits for you using my lib?

  • Avatar of AcidWeb AcidWeb Jan 13, 2011 at 10:25 UTC - 0 likes

    Thank you very much for this lib. I'm using it in my own addon - REFlex - Battleground Historian.

  • Avatar of talryn1 talryn1 Sep 29, 2010 at 21:49 UTC - 0 likes

    I like the library. I was wondering if you had thought about adding an option to control whether mouseover highlighting is enabled. If you change the highlight color, it also will stop actual row selection from highlighting.

    I was able to turn off the row mouseover highlighting by calling RegisterEvent and replace the OnEnter and OnLeave but it seems like it would be nice to just have an option. It's possible in the future that those events could be use internally for other purposes.

  • Avatar of ddumont ddumont Aug 31, 2010 at 13:12 UTC - 0 likes

    Crap, my notifications of posts stopped working....

    Have you figured out a solution to your problem? That one sounds easy to fix. You have to anchor the frame to the parent frame.

  • Avatar of jbana jbana Aug 12, 2010 at 21:06 UTC - 0 likes

    Hope you can help me :)

    when i create a frame that include a scrollingtable created with CreateST this table doesn't move with my main frame and stay in middle of screen. anyway to change this behavoir ?

  • Avatar of ddumont ddumont Jun 18, 2010 at 02:59 UTC - 0 likes

    Sdkp does it... well.. it uses the docellupdate function http://www.wowace.com/addons/lib-st/pages/docell-update/

    which was what i was talking about. The sidedrawer on the right contains a list of loot with a custom image and hoverover.

  • Avatar of Allara Allara Jun 18, 2010 at 01:14 UTC - 0 likes

    Any documentation on that, or another add-on that does it? I haven't been able to find anything so far. Thanks!

  • Avatar of ddumont ddumont Jun 18, 2010 at 00:56 UTC - 0 likes

    There is definitely a way to do this. There's a draw function for each cell, row, etc, where you can set up any kinds of frames you want. You can attach a button frame here and then set its click handlers however you wish.

Facts

Date created
Oct 14, 2008
Categories
Last update
Jun 06, 2011
Development stage
Mature
License
GNU General Public License version 2 (GPLv2)
Curse link
lib-ScrollingTable
Reverse relationships
12
Downloads
12,129
Recent files
  • R: v4.0 for 4.1 Jun 06, 2011
  • A: r145 for 4.1 Jun 06, 2011
  • R: v3.9 for 4.0.6 Jun 06, 2011
  • A: r143 for 4.0.6 Jun 06, 2011
  • A: r142 for 4.0.6 Apr 25, 2011

Authors

Relationships

Embedded library
LibStub