bugGNU Octave - Bugs: bug #62490, Document how to allow entering...

 
 

bug #62490: Document how to allow entering multiple lines in an "edit" uicontrol()

Submitter:  Glite <linuxbckp>
Submitted:  Thu 19 May 2022 11:16:16 AM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 7.1.0 Operating System:  * Any
Fixed Release:  9.1.0 Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 29 Jan 2024 10:43:05 PM UTC, comment #5: 

the patch pushed for bug #65167 updated the list of uiXX property descriptions, and this was at least described in the Min and Max property text. I just appended the following note to the uicontrol help text regarding the 'edit' and 'listbox' control styles :


##
## Note:  For the @qcode{"edit"} and @qcode{"listbox"} styles, the single or
## multiple line/selection behavior is determined by the @qcode{"Min"} and
## @qcode{"Max"} properties, permitting multiple lines/selections when the
## values are set such that @w{@code{Max - Min > 1}}.
##


pushed to stable as
https://hg.savannah.gnu.org/hgweb/octave/rev/94b3e5c286fd

closing report as fixed.

Nicholas Jankowski <nrjank>
Group Member
Fri 20 May 2022 03:52:22 PM UTC, comment #4: 

That can solve this problem.
Btw we should improve the document about how to enable multiple lines of text. Otherwise users may just regard that as a workaround.

comment #3:

> It probably needs some documentation, but in Octave, like in ML counterpart, you need to set the difference between "max" and "min" properties larger than 1 to allow multi-line edit. E.g, the following produces a multiline uicontrol for me:
>


> >> uicontrol(gcf, 'style', 'edit', 'min', 0, 'max', 4, 'position', [50 50 200 200])
> >> # type e.g "a ENTER b ENTER c
> >> get (h, "string")
> ans =
> {
>   [1,1] = a
>   [2,1] = b
>   [3,1] = c
> }


Glite <linuxbckp>
Fri 20 May 2022 03:19:41 PM UTC, comment #3: 

It probably needs some documentation, but in Octave, like in ML counterpart, you need to set the difference between "max" and "min" properties larger than 1 to allow multi-line edit. E.g, the following produces a multiline uicontrol for me:


>> uicontrol(gcf, 'style', 'edit', 'min', 0, 'max', 4, 'position', [50 50 200 200])
>> # type e.g "a ENTER b ENTER c
>> get (h, "string")
ans =
{
  [1,1] = a
  [2,1] = b
  [3,1] = c
}


Pantxo Diribarne <pantxo>
Group Member
Fri 20 May 2022 12:25:34 PM UTC, comment #2: 

I change an example code:

Use this code to generate a textfield:

>> a=uicontrol(gcf, 'style', 'edit')


and when I enter Enter the line doesn't change.

Glite <linuxbckp>
Thu 19 May 2022 01:44:53 PM UTC, comment #1: 

The example you attached is pretty convoluted. And it is not clear to me what would happen when I run `Notebook`. (So, I won't do it.)

Could you please provide a minimal example that reproduces the issue?

See: https://en.wikipedia.org/wiki/Minimal_reproducible_example

Markus Mützel <mmuetzel>
Group administrator
Thu 19 May 2022 11:16:16 AM UTC, original submission:  

In Octave doc, uicontrol() of style=edit should support multiple lines of text input, but when I enter Enter the line doesn't change.

You may use the appendix code to reapperance this bug, by this code:

>> Notebook

Glite <linuxbckp>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53230:  MyNotebook.zip added by linuxbckp (10KiB - application/zip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by linuxbckp (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 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-29 nrjank StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 9.1.0
    2022-05-22 mmuetzel CategoryGUI Documentation
        Item GroupIncorrect Result Documentation
        StatusNeed Info Confirmed
        Release6.4.0 7.1.0
        Operating SystemGNU/Linux Any
        Summaryedit style uicontrol() doesn't support multiple lines of text Document how to allow entering multiple lines in an "edit" uicontrol()
    2022-05-19 mmuetzel StatusNone Need Info
    2022-05-19 linuxbckp Attached File- Added MyNotebook.zip, #53230

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code