No BSD License  

Highlights from
uitable

4.0

4.0 | 3 ratings Rate this file 40 Downloads (last 30 days) File Size: 44.41 KB File ID: #11201
image thumbnail

uitable

by Todd Pataky

 

26 May 2006 (Updated 26 May 2006)

UITABLE creates a 2D graphic uitable as an alternative to MATLAB 7's UITABLE (MATLAB 6.5, no-JAVA mo

| Watch this File

File Information
Description

UITABLE creates a two dimensional graphic uitable
       This is an alternative to MATLAB 7's UITABLE. It will work with MATLAB 6.5 and also in no-JAVA mode.

This was developed based on the functions "tableGUI" by Joaquim Luis (2006-02-17) and "Editable Table in MATLAB" by Morris Maynard (2005-01-17) which are both available from the MATLAB Central File Exchange.

Examples:

data = uitable(rand(3,2));

%Creates a 3x2 modal uitable in a new figure window.

figure
hAxes = axes('units','pixels','position',[45 45 400 140]);
a = uitable(hAxes, cell(3,12));

%Creates an empty 3x12 modal uitable in the axes specified by hAxes

Properties:
modal: 0 or 1 specifying modal state
nVisibleRows: int specifying number of visible rows
nVisibleCols: int specifying number of visible columns
colLabels: 0, 1, or cell array of strings for column labels
checkBoxes: 0, 1, or vector of int for check boxes
rowNumbers: 0 or 1 for row numbers

disabledColumns: [] or vector of int for preventing column editing
colWidth: 1 or vector of int for indicating relative column widths
highlightCell: 0 or 1 -- highlight selected cell
highlightRow: 0 or 1 -- highlight row of selected cell
highlightCol: 0 or 1 -- highlight column of selected cell
fontsize: int for font size
precision: s for formatting data (see fprintf)

The main features of this UITABLE implementation are:
(1) Axes-defined table size. This makes it convenient for use with GUIDE and general GUI use.
(2) Modal/non-modal behavior. Can use within larger GUI or as stand-alone.
(3) Vertical and horizontal sliders. User controls how many cells to show.
(4) Row checkboxes. Optional specification for number of check boxes.
(5) Highlighting. Cells, rows, columns highlighting options exist.
(6) Column disabling. Prevent editing of specified data columns.

Its main disadvantages are:
(1) Large tables (> 400 cells) may require substantial refresh duration when scrolling.
(2) Table implemented as a set of uicontrols. User must be cautious with commands like findobj('type','uicontrol').
(3) If highlighting is enabled, WINDOWS users must click on a cell twice to edit its contents. Single clicking suffices in UNIX. Refer to ?MATLAB functions: uicontrol? in MATLAB help.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Editable Table in MATLAB

MATLAB release MATLAB 6.5.1 (R13SP1)
Other requirements Matlab 6.5 or higher
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
11 May 2007 pablo ruiz

I will add one comment just to thank the autor for sharing his work.
It works great if units of graphics objets are in pixels, but it fails if its value is 'characters' which moreover is the default value used in GUIDE guis. So I suggest to add one line to ensure units are set to pixels when graphic calculatins are to be made. For example, I will add a line 630 of the type: set(tb.hAxes,'Units','pixels')
I have to research a little more to find our if its need to add something similar everywhere else. But, as I said, thanks to the author for his work

30 Jan 2008 Matt A

works like a charm! best improvements over matlab uitable - remove row numbers, customize column widths

09 Dec 2009 pvi  
09 Dec 2009 pvi

Causes compiled standalone slowdown (6.5.2 R13SP2). Has anybody fixed this?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
gui tools Todd Pataky 22 Oct 2008 08:26:57
example Todd Pataky 22 Oct 2008 08:26:57
gui Todd Pataky 22 Oct 2008 08:26:57
table Todd Pataky 22 Oct 2008 08:26:57
axes Todd Pataky 22 Oct 2008 08:26:57
uicontrol Todd Pataky 22 Oct 2008 08:26:57
axes Ragonz RR 31 Jul 2010 10:37:09
table Cloudylsh Lau 04 Apr 2011 00:36:35
table Christopher Hazel 09 Jan 2012 14:15:13

Contact us at files@mathworks.com