STR #2767

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]

Return to Bugs & Features | Post Text | Post File | Prev | Next ]

STR #2767

Application:FLTK Library
Status:5 - New
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Fix scrollbar visiblity from causing miscalcuation on select()
Created By:dfatfl
Assigned To:Unassigned
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]
Name/Time/Date Filename/Size top right image
#1 dfatfl
13:40 Nov 10, 2011
bottom left image   bottom right image

Trouble Report Comments:

Post Text ]
Name/Time/Date Text top right image
#1 dfatfl
13:40 Nov 10, 2011
This patch fixes a problem where select() is used to select an item before drawing (and in other instances) since the horizontal or virtual scrollbar may be reported as visible when they won't be in the end (and the other way around).  For example, browser box that is created to a certain size (up to a max) based on number of items, example 2, now 2 items are added, select (2) is used to select the second item, what ends up being drawn is 2nd item at the top (first item scrolled off) with a scrollbar that is jacked up because it's small.  Occurs because hscrollbar was reported as visible at the time.  There are probably lots of similar conditions that occur.  This patch fixes it, and adds a new item_quick_width so we can always calculate the full size (quickly) instead of only partial (per scroll of screen) if the widest item was deleted.   I've tested basic functionality, probably need browser test app in test folder to allow adding/removing items so edge cases and dynamiclly adding/removing items is fully tested.  
#2 matt
14:19 Dec 10, 2011
Could you please submit a short self-contained example and explain how this situation can be repeated? Thanks.  
#3 dfatfl
23:33 Dec 10, 2011
I guess I could, the steps until I can get to it is:

1) create a Fl_Browser object with a height equal to two items (perfect fit).  (xyz=new FL_Browser(....))

2) add two items to the browser.  xyz->add("1"); xyz->add("2");

3) select the second item.  xyz->select(2)

open / show your window that contains the browser object.
#4 AlbrechtS
03:35 Feb 07, 2019
Moved from 1.3-feature to 1.4-feature.

This STR has been superseded, see also cumulative patch in STR 3485:
bottom left image   bottom right image

Return to Bugs & Features | Post Text | Post File ]


Comments are owned by the poster. All other content is copyright 1998-2023 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.