[fltk.general] static text widget
What would be the equivalent of a windows static text control in fltk widgets? Also, Is there a cheat sheet that gives the various windows controls and the equivalent for fltk widget? TIA!! ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] static text widget
On 7 Oct 2011, at 19:50, David wrote: > What would be the equivalent of a windows static text control in fltk > widgets? No idea - what's a "static text control" do? If you just want to display some static text, use a simple Fl_Box and see how that goes. Most fltk widgets have specific label fields anyway, so that probably covers a lot of the places where static text would be useful, I imagine. For anything else, Fl_Box ought to cover it I think. Probably... Oh, and I assume you mean "Windows" rather than "windows" here, since all the desktop GUI systems have "windows" but only MS have "Windows"... > Also, Is there a cheat sheet that gives the various windows controls and the > equivalent for fltk widget? No, don't think so - but if you want to write one, we could post it on the website for the future... ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] static text widget
On 10/07/11 11:50, David wrote: > What would be the equivalent of a windows static text > control in fltk widgets? For a plain text widget, you can either use Fl_Box or Fl_Widget with the label() as the text. eg: Fl_Box *box = new Fl_Box(x,y,w,h); // create a box box->label("Some static text"); // assign static string to label So a complete program might be: #include #include #include int main() { Fl_Window *win = new Fl_Window(300,300); Fl_Box *box = new Fl_Box(10,10,280,40); // create a box box->label("Some static text"); // assign static string to label box->color(FL_RED); // OPTIONAL: make the box red box->box(FL_FLAT_BOX); // OPTIONAL: make the box area visible win->show(); return(Fl::run()); } > Also, Is there a cheat sheet that gives the various windows controls and the > equivalent for fltk widget? I'm not aware of one. Few if any of us use the MS Windows API for making widgets, so pretty sure there's no such cheat sheet/rosetta stone for converting between Windows <-> FLTK <-> Qt <-> wxwidgets, though that would certainly be interesting, assuming someone knew at least two widget sets well enough to start one. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk