A problem with the HButtonBox for aligning text is that the text control cannot be vertically aligned inside its own bounding box. So HButtonBox resizes the text uicontrol and then the text appears above its intended position.
Perhaps using a swing text control fixes this, but maybe it would be possible make something specifically for lining up text?
I am liking this table more and more as my dislike for the built-in uitable increases.
One thing I have not been able to figure out: When I manually edit a table with numerical entries they are converted to strings. Aparently Java allows some sort of type checking that converts the strings back to numbers, but I cannot figure out how to accomplish this in Matlab. The only idea I have is setting a FocusLostCallback that does a str2num on the cell, but, firstly,
FocusLostCallback doesn't seem to be triggered when you navigate by keyboard, and secondly I do not seem to be able to set a cell value to a vector (e.g. [3,4]) which is what I really want.
As I mentioned above, it doesn't work easily with the new uitable, and I guess it isn't trivial to fix this. Possibly uitable should be called with the 'v0'-switch to avoid getting a warning each time.
I just found out the hard way that if the first element in my data cell array is empty, I get the error
"Error: Data must be a MATLAB cell array"
This seems to be a bug in uitable.m, not createTable
The fix I'm using is
if isempty(data{1}), data{1} = ' '; end % one whitespace
This looks very promising. I've (barely) tried using it with Yair Altman's 'uicomponent', which lets you use swing-components in your gui, and the components kept showing up all over the place, not respecting the layout. Any idea why this may be, or whether you think this should work in the first place?