FLTK logo

STR #3301

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 | Roadmap 1.3 | Post Text | Post File | SVN ⇄ GIT | Prev | Next ]

STR #3301

Application:FLTK Library
Status:5 - New
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Fl_Text_Display::scroll(line) not working with wrap_mode()
Created By:superbem
Assigned To:Unassigned
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]
Name/Time/Date Filename/Size  
#1 greg.ercolano
06:29 Jul 23, 2016
#2 greg.ercolano
06:51 Jul 23, 2016

Trouble Report Comments:

Post Text ]
Name/Time/Date Text  
#1 superbem
00:20 Apr 10, 2016
Text_display scroll to line in wrap_mode doesn't scroll to the line specified, in no-wrap works as it should.  
#2 greg.ercolano
06:28 Jul 23, 2016
I take this to mean this is regarding the Fl_Text_Display widget
using scroll(int topLineNum, int horizOffset) to scroll to a specific
line while the wrap_mode() is set to e.g. WRAP_AT_BOUNDS,
and lines are long enough to wrap.

Can confirm with the attached program, which uses scroll(4,0) to scroll
the display to show line #0004:

    It shows line 0002 instead of 0004, apparently due to the effects
    of line wrapping.

    If you comment out wrap_mode(), it then shows line 0004 at the
    top of the widget as expected.

Not sure the problem], just wanted to include a test program
that demonstrates the problem so it can more easily be investigated.

Adjusting the Summary for clarity:

    BEFORE: Text_display scroll to line in wrap_mode
     AFTER: Fl_Text_Display::scroll(line) not working with wrap_mode()
#3 greg.ercolano
06:51 Jul 23, 2016
Attaching a v2 test program that includes 2 buttons
to let one jump to line #1 or line #4.
#4 AlbrechtS
15:21 Oct 01, 2016
Changed priority to 2 (Low). This is a minor bug that should not block a release.  
#5 greg.ercolano
04:24 Oct 08, 2017
Hmm, I think scroll() counting the 'post wrapped' lines.
So if a single line wraps into 3 separate lines, scroll() is counting
this as 3 separate lines, not as one line.

If that's the case, it seems to be working predictably,
though I don't think this is what anyone would or should expect
it to do.

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


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