FLTK logo

Re: [fltk.general] Fl_Hold_Browser

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 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Fl_Hold_Browser Albrecht Schlosser Sep 10, 2020  
 
On 9/10/20 12:19 PM holm.h...@gmail.com wrote:

I have the following code :
       { Fl_Hold_Browser* o = new Fl_Hold_Browser(xs+200, ys, 200, 300);
         for (i=0;i<100;i++){
           char s[256];
           sprintf(s, "number %d\n", i);
           o->add(s);
         }
         o->end();
       }
The scrollbar will however only scroll the 73 first items.
If I loop to 1000 (instead of 100) the I can scroll the 734 first items.

The code work fine in a small example code, but not in my application.

Do any have a tip of what may cause this / how to fix ?

Please post complete (compileable) example code and your FLTK version. This may be important.

That said, I have a vague recollection that this can have to do with the line height and/or line spacing in the browser.

Some ideas what/how to test:

You may want to set one or the other (sorry, I don't know exactly which methods right now). Order can be significant!

Make the window resizable and see what happens when the window (browser) gets resized. Does this "fix" it?

If it's something like that a small demo program would help us to test and fix it (together with your findings and maybe test instructions).

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/5402bdf5-cf47-f092-1a09-4771bc873fdb%40online.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

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'.