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

Re: Fl_Hold_Browser Greg Ercolano Sep 10, 2020  
 
On 2020-09-10 04:18, holm.h...@gmail.com wrote:
> Thanks, you pointed me to the right way: it seems to be related to font/sizing. I still have not made a working small example where the problem is exposed, but will try to make one.
>

    I couldn't replicate, but I did make this which seems to work OK.

#include <stdio.h>
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Hold_Browser.H>
int main(int argc, char *argv[]) {
  Fl_Double_Window *win = new Fl_Double_Window(250, 350, "Simple Browser");
  win->begin();
  {
    // Create Hold Browser
    Fl_Hold_Browser *hold = new Fl_Hold_Browser(10, 10, 200, 300, "Hold");
    char s[256];
    for (int i=0; i<100; i++) {
      sprintf(s, "number %d\n", i);
      hold->add(s);
    }
    hold->end();
  }
  win->end();
  win->resizable(win);
  win->show(argc, argv);
  return(Fl::run());
}

-- 
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/77d9bdb2-a2ac-b59d-ad77-5f4f940ebad8%40seriss.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

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