bugGNU Octave - Bugs: bug #38509, Multiline text not supported with...

 
 

bug #38509: Multiline text not supported with uicontrol of type editable text field

Submitter:  None
Submitted:  Wed 13 Mar 2013 03:47:11 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 19 Apr 2015 08:11:42 PM UTC, comment #3: 

Closing report as fixed.

Mike Miller <mtmiller>
Group Member
Mon 13 Apr 2015 08:30:15 PM UTC, comment #2: 

Now both uicontrols show 3 lines of text, due to this cset:
http://hg.savannah.gnu.org/hgweb/octave/rev/76c72314d905

May I close the report?

Pantxo Diribarne <pantxo>
Group Member
Sat 29 Mar 2014 10:06:14 PM UTC, comment #1: 

Thanks for your bug report. The qt toolkit is now merged into the development version of Octave for the 4.0 release. I can confirm your report on Linux, although there is a slight typo. With the fixed version of your example below, the resulting panels show the same results for either a cell array or a string matrix (strings joined with vertical bar).

Is this the expected behavior in Matlab when an array of strings is given as the String property for an edit uicontrol? The public documentation does not say anything about a string matrix or cell array. In other words, is this a feature request or a Matlab compatibility issue?


hf = figure;
set(hf,'Units','normalized');
hp = uipanel('Title','Text panel','Units','normalized','Position',[0.05 0.05 0.9 0.9],'Parent',hf);
he = uicontrol('Style','edit','String','','Units','normalized','Position',[0.1 0.1 0.4 0.4],'Parent',hp,'BackgroundColor','y','Max',10,'Min',1);
str = {'line 1';'line 2';'line 3'};
set(he,'String',str);
he2 = uicontrol('Style','edit','String','','Units','normalized','Position',[0.1 0.55 0.4 0.4],'Parent',hp,'BackgroundColor','g','Max',10,'Min',1);
str2 = ['line 1';'line 2';'line 3'];
set(he2,'String',str2);


Mike Miller <mtmiller>
Group Member
Wed 13 Mar 2013 03:47:11 PM UTC, original submission:  

The following results in the text being displayed all on one line instead of multiple lines, as expected:


hf = figure;
set(hf,'Units','normalized');
hp = uipanel('Title','Text panel','Units','normalized','Position',[0.05 0.05 0.9 0.9],'Parent',hf);
he = uicontrol('Style','edit','String','','Units','normalized','Position',[0.1 0.1 0.4 0.4],'Parent',hp,'BackgroundColor','y','Max',10,'Min',1);
str = {'line 1';'line 2';'line 3'};
set(he,'String',str);
he2 = uicontrol('Style','edit','String','','Units','normalized','Position',[0.1 0.55 0.4 0.4],'Parent',hp,'BackgroundColor','g','Max',10,'Min',1);
str2 = ['line 1';'line 2';'line 3'];
set(he,'String',str);


When using a cell array of strings, it displays everything onto one line and when using a string matrix, it doesn't display anything at all (see attached screenshot).

This is with Octave 3.6.2 and the Qt graphics toolkit.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #27601:  uicontrol_edit_txt_bug.jpg added by None (27KiB - image/jpeg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  •  

    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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-19 mtmiller StatusWorks For Me Fixed
        Open/ClosedOpen Closed
    2015-04-13 pantxo StatusNeed Info Works For Me
    2014-03-29 mtmiller CategoryPlotting Plotting with OpenGL
        Severity3 - Normal 1 - Wish
        Item GroupNone Feature Request
        StatusNone Need Info
        Release3.6.2 dev
        Operating SystemMicrosoft Windows Any
    2013-03-13 None Attached File- Added uicontrol_edit_txt_bug.jpg, #27601

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code