bugGNU Octave - Bugs: bug #49552, uicontrol popupmenu sizing

 
 

bug #49552: uicontrol popupmenu sizing

Submitter:  -X- <jsh>
Submitted:  Mon 07 Nov 2016 08:25:47 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.3 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 03 Nov 2018 08:58:03 AM UTC, comment #4: 

Yes, I think I would leave it as it is. It allows to have full control on the size of the popupmenu, which can make things a bit prettier at times. We can revisit this if we get a lot of complaints.

Guillaume <gyom>
Fri 02 Nov 2018 08:04:41 PM UTC, comment #3: 

@Guillaume: Should we marke this bug as "Won't Fix".  You seemed to appreciate the extra freedom in Octave to change things.

Rik <rik5>
Group administrator
Mon 07 Nov 2016 11:12:46 AM UTC, comment #2: 

I agree that Octave and Matlab behave differently here but I prefer what Octave does. It makes it possible to have a control on how a popupmenu actually looks, and especially make it have the same size than the other uicontrols, such as here:


f = figure( 'toolbar', 'none' );
c1 = uicontrol( 'parent', f, 'units', 'normalized', 'position', [0.1 0.8 0.3 0.1], 'style', 'pushbutton', 'string', 'pushbutton' );
c2 = uicontrol( 'parent', f, 'units', 'normalized', 'position', [0.6 0.8 0.3 0.1], 'style', 'popupmenu', 'string', {'popupmenu','b','c'} );
c3 = uicontrol( 'parent', f, 'units', 'normalized', 'position', [0.1 0.5 0.3 0.1], 'style', 'radiobutton', 'string', 'radiobutton' );
c4 = uicontrol( 'parent', f, 'units', 'normalized', 'position', [0.6 0.5 0.3 0.1], 'style', 'togglebutton', 'string', 'togglebutton' );
c5 = uicontrol( 'parent', f, 'units', 'normalized', 'position', [0.1 0.2 0.3 0.1], 'style', 'text', 'string', 'text' );
c6 = uicontrol( 'parent', f, 'units', 'normalized', 'position', [0.6 0.2 0.3 0.1], 'style', 'listbox', 'string', 'listbox' );



Guillaume <gyom>
Mon 07 Nov 2016 08:27:39 AM UTC, comment #1: 

somehow the bug report title got cut off, should be:

uicontrol popupmenu height should be fixed (qt)

or something along those lines

-X- <jsh>
Mon 07 Nov 2016 08:25:47 AM UTC, original submission:  

uimenus in Octave take the whole height of the specified uicontrol which can end up looking quite bad as in the lower panel in the attached code. In Matlab the popupmenu height is always fixed to the height of the string/text. Also Matlab popupmenu background default is white while in Octave I assume its inherited from the parent.



f = figure( 'toolbar', 'none' );
p1 = uipanel( 'parent', f, 'position', [0 1-1/8 1 1/8], 'title', 'title1' );
p2 = uipanel( 'parent', f, 'position', [0 0 1 1/2], 'title', 'title2' );
c1 = uicontrol( 'parent', p1, 'units', 'normalized', 'position', [0 0 1 1], 'style', 'popupmenu', 'string', {'1' '2' '3' '4' '5'} );
c2 = uicontrol( 'parent', p2, 'units', 'normalized', 'position', [0 0 1 1], 'style', 'popupmenu', 'string', {'a' 'b' 'c' 'd' 'e'} );


-X- <jsh>

 

(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 pantxo (Updated the item)
  • -email is unavailable- added by gyom (Posted a comment)
  • -email is unavailable- added by jsh (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-04 rik5 StatusNeed Info Wont Fix
        Open/ClosedOpen Closed
    2018-11-02 rik5 StatusNone Need Info
    2018-11-02 pantxo CategoryGUI Plotting with OpenGL

    Back to the top

    Powered by Savane 3.14-6db8.
    Corresponding source code