[EMAIL PROTECTED] wrote:
> Hi,
> 
> Just take a look at this simple app:
> 
> class Application : public Fl_Double_Window
> {
>     Fl_Box *bx; //Child box widget
> 
>     public:
> 
>      Application(int w, int h, const char *l, int argc, char *argv[]);
> };
> 
> Application::Application(int w, int h, const char *l, int argc, char *argv[])
> : Fl_Double_Window(w, h, l)
> {
> 
>   box(FL_DOWN_BOX); //Add 2 pixels borders all around the main window

This does not _add_ 2 pixels, but draws a border _within_ the main window.

>   color((Fl_Color) FL_WHITE);
> 
>   begin();
>   bx = new Fl_Box(0,0,100, 400);
>   bx->box(FL_FLAT_BOX);
>   bx->color((Fl_Color) FL_RED);
> 
>   end();
> 
>   resizable(this);
>   show(argc, argv);
> }
> 
> int main (int argc, char ** argv)
> {
>    Application myApp(500, 300, "My App", argc, argv);
> 
>   return(Fl::run());
> }
> 
> the pb is that the red box erase the left border and a part of the bottom 
> border.

You mean "the _top_ border", don't you?

> How can I do to keep the FL_DOWN_BOX borders of the main window visible ?

You should take the box's border into account. You can use

Fl::box_dx, Fl::box_dy, Fl::box_dw, and Fl::box_dw to get the border 
width of a specific box type, see e.g.

http://www.fltk.org/doc-1.1/Fl.html#Fl.box_dx

Albrecht

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

Reply via email to