On 21 Jun 2009, at 11:03, Michael Schmid wrote:
> Is there a way to draw a button with several lines of text? And all  
> the rows should be centered... I guess (And I didn't find any  
> sollution by googling) this is not implemented in standard :-(

That is the default behaviour, it ought to work. You need to enable  
wrap on the button and it should Just Work.

(Caution: my mail service will probably wrap this horribly and break  
it...)


This fluid file:
-----------------
# data file for the Fltk User Interface Designer (fluid)
version 1.0109
header_name {.h}
code_name {.cxx}
Function {} {open
} {
   Fl_Window {} {open
     xywh {419 183 402 360} type Double visible
   } {
     Fl_Button {} {
       label {Here is a button with very long lines that are split  
over multiple lines within the button} selected
       xywh {100 105 225 125} labelsize 19 labelcolor 15 align 192
     }
   }
}
-----------------

begets this cxx file:
-----------------
// generated by Fast Light User Interface Designer (fluid) version  
1.0109

#include "big-label.h"

int main(int argc, char **argv) {
   Fl_Double_Window* w;
   { Fl_Double_Window* o = new Fl_Double_Window(402, 360);
     w = o;
     { Fl_Button* o = new Fl_Button(100, 105, 225, 125, "Here is a  
button with very \
long lines that are split over multiple lines \
within the button");
       o->labelsize(19);
       o->labelcolor(FL_SELECTION_COLOR);
       o->align(192);
     } // Fl_Button* o
     o->end();
   } // Fl_Double_Window* o
   w->show(argc, argv);
   return Fl::run();
}
-----------------

Which I think does what you want?

-- 
Ian



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

Reply via email to