bugGNU Octave - Bugs: bug #58186, Vertical scrollbar with an...

 
 

bug #58186: Vertical scrollbar with an inactive Edit uicontrol

Submitter:  Guillaume <gyom>
Submitted:  Wed 15 Apr 2020 02:10:51 PM UTC
   
 
Category:  Plotting Severity:  1 - Wish
Priority:  2 Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 26 Apr 2020 09:34:19 PM UTC, comment #9: 

I am not aware of any change in the defaults on Matlab. I attach a screenshot of Matlab on Windows, which looks similar. The background color for "Edit" is [1 1 1] when "on" or "inactive", and [0.94 0.94 0.94] when "off" on Windows (and #ebe9ed on Linux).

I thought I had an opened bug report on this specific point about background color for "Edit" uicontrol but I cannot find it. Related issues were discussed in bug #48255 and bug #49247.


Guillaume <gyom>
Sun 26 Apr 2020 05:42:56 PM UTC, comment #8: 

@Guillaume: One other difference I note is that the background color of the text fields appears to be a light gray in Octave and full white in Matlab.  It would seem that Octave is correct here because the default "Backgroundcolor" property is supposed to be [0.94, 0.94, 0.94].  See https://www.mathworks.com/help/matlab/ref/matlab.ui.control.uicontrol-properties.html.

Do you happen to have an override set in Matlab, or is Matlab really implementing some other behavior?

Rik <rik5>
Group administrator
Sun 26 Apr 2020 08:27:33 AM UTC, comment #7: 

Thanks Rik. For the record, I attach a screenshot of how the uicontrol now gets displayed in Octave and Matlab.


Guillaume <gyom>
Sun 26 Apr 2020 02:50:54 AM UTC, comment #6: 

I checked in a fix for this here https://hg.savannah.gnu.org/hgweb/octave/rev/cba489221bab.

Closing report.

Rik <rik5>
Group administrator
Fri 24 Apr 2020 04:27:42 PM UTC, comment #5: 

Thanks for testing.  I have the start of a patch for bug #57128 (gray out disabled uicontrol objects) but I needed to understand how "inactive" was being handled.

Rik <rik5>
Group administrator
Fri 24 Apr 2020 09:08:55 AM UTC, comment #4: 

Yes, "inactive" is probably best described as read-only.

  • "on": cursor has edit shape, text is selectable and editable, the scrollbar works and responds to the scroll wheel.
  • "inactive": cursor has edit shape, text is not selectable or editable, the scrollbar works and responds to the scroll wheel.
  • "off": cursor has pointer shape, text is not selectable or editable, there is no scrollbar but the text still moves according to the scroll wheel (i.e. one can still read the entire content).


Guillaume <gyom>
Fri 24 Apr 2020 01:31:43 AM UTC, comment #3: 

I'm confused by what Matlab is implementing with the "Inactive" state.  The underlying Qt widget is either enabled or disabled with no third category.

Can the text in the inactive uicontrol be edited?  Can you click in the inactive window and move the cursor around?  It might be that by "inactive" they really mean read-only, but that the widget itself is still enabled according to the window system.

Rik <rik5>
Group administrator
Tue 21 Apr 2020 09:20:21 PM UTC, comment #2: 

Your description of the Matlab behavior is accurate: the scrollbar is disabled only for 'Enable' set to 'off'. That said, with all settings, one can still scroll through the text using the scroll wheel.
Text centering seems indeed to be a different issue, I open another specific bug report.


Guillaume <gyom>
Mon 20 Apr 2020 07:01:04 PM UTC, comment #1: 

Confirmed, although it does seem a pretty small issue so I have lowered the priority.

For Octave, the table of behaviors is


Enable    | Scrollbar
 on       |  works
 off      |  doesn't work
 inactive |  doesn't work


Is the table for Matlab behavior this?


Enable    | Scrollbar
 on       |  works
 off      |  doesn't work
 inactive |  works


On your last point, does the centering of text change when the Enable status is changed?  Or is this a separate difference that Matlab always centers text in a text edit box?  If it is the latter then that is a new bug report.


Rik <rik5>
Group administrator
Wed 15 Apr 2020 02:10:51 PM UTC, original submission:  

When an Edit uicontrol is set to 'inactive', the vertical scrollbar is disabled in Octave while it still works in Matlab. See attached screenshot obtained with the following code:


figure;
opts = {'on', 'off', 'inactive'};
for i=1:numel(opts)
  str = repmat ([opts{i} ' '], 1, 100);
  uicontrol (...
    "Style","edit", ...
    "Units",'normalized', ...
    "Position",[0.25 i/4 0.5 0.2], ...
    "Max",2, ...
    "String", str, ...
    "Enable",opts{i});
endfor


One also notices that the text if middle centred in Matlab while left centred in Octave. The graying of the edit control when Enable is 'off' is discussed in bug #57128.

Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #48945:  uicontrol_windows.png added by gyom (12KiB - image/png)
file #48939:  uicontrol_edit.png added by gyom (43KiB - image/png)
file #48898:  HorizontalAlignment.png added by gyom (15KiB - image/png)
file #48843:  uicontrol.png added by gyom (43KiB - image/png)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-04-26 gyom Attached File- Added uicontrol_windows.png, #48945
    2020-04-26 gyom Attached File- Added uicontrol_edit.png, #48939
    2020-04-26 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2020-04-25 rik5 Dependencies- Depends on bugs #57128
    2020-04-21 gyom Attached File- Added HorizontalAlignment.png, #48898
    2020-04-20 rik5 Severity3 - Normal 1 - Wish
        Priority5 - Normal 2
        StatusNone Confirmed
    2020-04-15 gyom Attached File- Added uicontrol.png, #48843

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code