bugGNU Octave - Bugs: bug #60951, get (uicontrol_object,...

 
 

bug #60951: get (uicontrol_object, "ListboxTop") property not implemented

Submitted by:  None
Submitted on:  Wed 21 Jul 2021 03:05:07 PM UTC  
 
Category:  GUI Severity:  1 - Wish
Priority:  2 Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Paul Mennen Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  dev
Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 22 Jul 2021 05:06:28 PM UTC, comment #3: 

Thanks for testing.  I have changed the Summary field to note the remaining issue, but also lowered the priority.  I don't need the read-access feature, but if someone else is keen to implement it they can.

Rik <rik5>
Project Administrator
Thu 22 Jul 2021 04:26:16 PM UTC, comment #2: 

@Rik: In Matlab R2021a, the value returned for the "listboxtop" property changes according to the where in the list the user has scrolled.
It looks like a single line of pixels of one item still counts as it being on the top.

Markus M├╝tzel <mmuetzel>
Project Member
Thu 22 Jul 2021 03:26:35 PM UTC, comment #1: 

This wasn't that hard to implement.  I checked a change in on the development branch here: http://hg.savannah.gnu.org/hgweb/octave/rev/ad023dbe9606.

This works for the example in this bug report which uses write access (set()).  It looks like Matlab has also implemented read-access for this property, which seems less useful to me.

Could you test the following code on Matlab?

h = uicontrol('style','listbox','position',[20 20 120 300],...
     'backgroundcolor','black','foregroundcolor','yellow',...
     'string',reshape(sprintf(' This is Line %2d',1:60),16,60)');
set(h,'listboxTop',40);
% now use the mouse to scroll the ListBox so that "This is Line 13" is at the top of the ListBox
get (h, 'listboxTop')

I'm wondering if it will report '13' or the value that was previously set ('40').

Rik <rik5>
Project Administrator
Wed 21 Jul 2021 03:05:07 PM UTC, original submission:  

Consider the following script:

h = uicontrol('style','listbox','position',[20 20 120 300],...
     'backgroundcolor','black','foregroundcolor','yellow',...
     'string',reshape(sprintf(' This is Line %2d',1:60),16,60)');
set(h,'value',30,'listboxTop',20);

When I run this in Matlab I get the 1st attached figure. Note that the 30th line is highlighted (because of the 'value' parameter) and that the 20th line is shown at the top of the listbox (because of the 'listboxTop' parameter).

When I run this in Octave I get the 2nd attached figure. Again the 30th line is highlighted as expected, although the highlighting is done in a strange way that makes it difficult to see the text under the highlight. That's awkward, but the more significant problem is that the 15th line is at the top, not the 20th line as expected. Further experiments show that the listboxTop parameter is always ignored and that the figure does not change no matter what value I set it to. This is a pretty useful parameter, and I hope Octave will support it in a future version.

~Paul

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #51677:  listbox2.png added by None (32KiB - image/png)
file #51676:  listbox1.png added by None (30KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by mmuetzel (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-07-26 jwe Severity3 - Normal => 1 - Wish
    2021-07-22 rik5 Priority3 - Low => 2
        StatusReady For Test => Confirmed
        SummaryListboxTop property not implemented => get (uicontrol_object, "ListboxTop") property not implemented
    2021-07-22 rik5 StatusConfirmed => Ready For Test
    2021-07-21 rik5 StatusNone => Confirmed
        SummaryListboxTop property has no effect => ListboxTop property not implemented
    2021-07-21 mmuetzel Priority5 - Normal => 3 - Low
        Item GroupIncorrect Result => Feature Request
        Release6.3.0 => dev
        Operating SystemMicrosoft Windows => Any
    2021-07-21 None Attached File- => Added listbox1.png, #51676
        Attached File- => Added listbox2.png, #51677

    Back to the top


    Powered by Savane 3.6