Dear list,

attached you find a small fluid example of Fl_Output's multiline mode compared to the, should I say "real"(?), Fl_Multiline_Output.

The result of the examle is somewhat confusing as I had expected that Fl_Multiline_Output works the same as in test/output.cxx . But here on a Linux box with FLTKv1.1.9, it keeps old text where it is and draws the new above with calling Fl_Multiline_Output->value(). So in this example the numbers are all printed at once. A ~7kB screenshot is attached - hopefully small enough to pass.

Any idea?


kind regards
Kai-Uwe Behrmann
--
developing for colour management www.behrmann.name + www.oyranos.org
# data file for the Fltk User Interface Designer (fluid)
version 1.0109 
header_name {.h} 
code_name {.cxx}
decl {\#include <stdio.h>} {global
} 

decl {\#include <FL/Fl_Multiline_Output.H>} {public global
} 

Function {make_window()} {open
} {
  Fl_Window {} {open
    xywh {209 404 500 485} type Double visible
  } {
    Fl_Output multi_line_output {selected
      xywh {25 30 450 165} type Multiline
    }
    Fl_Text_Display multi_line_output2 {
      xywh {25 220 450 125} align 4
      class Fl_Multiline_Output
    }
    Fl_Button {} {
      label {Change ml_output above}
      callback {static int i = 0;
  static char text[64];

  sprintf(text, "a new number %d\\n a new line %d", i, i++ );

  multi_line_output->value(text);
  multi_line_output2->value(text);}
      xywh {25 365 450 100}
    }
  }
} 

Function {main()} {open C return_type int
} {
  code {Fl_Window * w = make_window();
  w->show();

  return Fl::run();} {}
} 
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to