DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2550
Version: 1.3-current


As suggested above, one solution is to call make_current().
This small example program details that:


#include <stdio.h>
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
#include <FL/fl_draw.H>

int main(int argc, char ** argv) {
  char txt[100];
    
  Fl_Window *window = new Fl_Window(320,65);
  Fl_Box *box = new Fl_Box(0, 0, window->w(), window->h(), "");
  window->end();
  window->show();
  
  window->make_current();
  fl_font(FL_HELVETICA, FL_NORMAL_SIZE);
  int xx, xy, xw, xh;
  fl_text_extents("x", xx, xy, xw, xh);
  sprintf(txt, "w=%d h=%d", xw, xh);
  box->label(txt);
  
  return Fl::run();
}


Link: http://www.fltk.org/str.php?L2550
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to