bugGNU Octave - Bugs: bug #44749, Interpretation of cell array in...


bug #44749: Interpretation of cell array in 'String' property of a 'text' uicontrol

Submitter:  Guillaume <gyom>
Submitted:  Mon 06 Apr 2015 06:07:01 PM UTC
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  lostbard
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Jump to the original submission

Tue 07 Apr 2015 04:45:02 PM UTC, comment #6: 

Many thanks John, it works as expected now.

Guillaume <gyom>
Tue 07 Apr 2015 04:15:06 PM UTC, comment #5: 
John Donoghue <lostbard>
Group Member
Tue 07 Apr 2015 07:07:42 AM UTC, comment #4: 

It is indeed a 2x1 string at first but if you edit the content of the uicontrol (or just type enter to validate it), it returns a string, e.g. I get this if I replace 'a|b' with 'c<ENTER>d'

ans = c

Guillaume <gyom>
Tue 07 Apr 2015 02:41:17 AM UTC, comment #3: 

it looks like get(H,'String') returns a 2x1 cell, so it is just not displaying the same as matlab does

John Donoghue <lostbard>
Group Member
Mon 06 Apr 2015 10:04:12 PM UTC, comment #2: 

My main issue is actually with an 'edit' uicontrol:

H=uicontrol(F,'style','edit','Max',2,'string',{'a','b'},'units','normalized','Position',[0.05 0.05 0.9 0.9]);
% type return in the figure

i.e. a multiline text edit is returned as a pipe-separated string instead of a cell array.

Guillaume <gyom>
Mon 06 Apr 2015 08:52:42 PM UTC, comment #1: 

Related in matlab [1] : If you specify a cell array for a check box, push button, radio button, or toggle button, then MATLAB displays only the first element in the cell array.

Currently octave will display a | b for the button etc as well.

[1] http://www.mathworks.com/help/matlab/ref/uicontrol-properties.html

John Donoghue <lostbard>
Group Member
Mon 06 Apr 2015 06:07:01 PM UTC, original submission:  

F = figure;
uicontrol(F,'style','text','string',{'a','b'},'units','normalized','Position',[0.05 0.05 0.9 0.9]);

Octave displays:


while MATLAB displays:


Guillaume <gyom>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by gyom (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-07 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2015-04-07 lostbard StatusNone Ready For Test
        Assigned toNone lostbard
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code