HGTable - functions for displaying tabular data in a MATLAB list control
by Malcolm Wood
18 Apr 2006
(Updated 30 Apr 2010)
Uses a standard MATLAB listbox to display multiple columns of data
|
Watch this File
|
| File Information |
| Description |
MATLAB's Handle Graphics infrastructure does not provide a control which displays tabular data. In recent versions of MATLAB it is possible to use a Java table to do display such data, but even this can be tricky.
The solution provided here is to use a list control to display the data, putting one row of data on each line, separating columns with bar characters, and using a fixed-width font to ensure that columns are aligned properly. Separate callbacks can be used to receive events when the user selects a row in the list and when a row is double-clicked.
The main limitation of this approach is that only entire rows can be selected, not columns or individual "cells". |
| MATLAB release |
MATLAB 7.1.0 (R14SP3)
|
| Other requirements |
Tested on MATLAB 6.1 (R12.1) through 7.10 (R2010a). Tested on Windows only, but should be platform independent. |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (3) |
| 25 Apr 2006 |
Neha Khanna
|
|
|
| 14 Jan 2007 |
David Susanto
|
|
|
| 08 Sep 2011 |
Jamuna
|
|
|
| Updates |
| 17 Dec 2009 |
Review |
| 30 Apr 2010 |
Added copyright lines. Changed background colour of table in demo. |
| 30 Apr 2010 |
Updated requirements |
|
Contact us at files@mathworks.com