bugGNU Octave - Bugs: bug #58224, HorizontalAlignment property of...

 
 

bug #58224: HorizontalAlignment property of uicontrol Edit not recognized when Max property is not 1

Submitter:  Guillaume <gyom>
Submitted:  Tue 21 Apr 2020 09:47:23 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
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
   

Wed 22 Apr 2020 01:22:46 AM UTC, comment #1: 

This turned out to be easy.  The code has a single-line Edit object and a multi-line Edit object, and the code for changing alignment was simply never implemented.  I fixed that here https://hg.savannah.gnu.org/hgweb/octave/rev/2757f267a198.

Interestingly, "VerticalAlignment" only works for single-line Edit objects.  I checked with Matlab and they don't even mention "VerticalAlignment" as a valid property, so I guess we aren't incompatible.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Tue 21 Apr 2020 09:47:23 PM UTC, original submission:  

As spotted in bug #58186, the text of an Edit styled uicontrol is not aligned according to the HorizontalAlignment property but remains on the left. This only occurs when the Max property is set to a value greater than 1.


figure;
opts = {'left', 'center', 'right'};
for i=1:numel(opts)
  u(i) = uicontrol (...
    "Style", "edit", ...
    "Units", "normalized", ...
    "Position", [0.25 i/4 0.5 0.2], ...
    "HorizontalAlignment", opts{i}, ...
    "Max", 2, ...
    "String", opts{i});
end
pause (2);
set (u, "Max", 1);


Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

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

    Date Changed by Updated Field Previous Value => Replaced by
    2020-04-22 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code