please disregard this message, I sent it before having finished it
testalucida
> Hi all,
>
> I made my own class TaskDrawingPanel inherited from Fl_Widget and put it into
> a Fl_Scroll instance, which in turn is a child of my main window.
>
> The draw method of TaskDrawingPanel does nothing else then drawing a
> rectangle.
> My Problem: the rectangle doesn't redraw properly after scrolling.
>
> The main method looks like so:
>
> int main(int argc, char **argv) {
> Fl_Double_Window mainWin( 50, 50, 400, 400, "TaskOrganiser" );
> mainWin.box( FL_NO_BOX );
> Fl_Scroll scroll( 0, 0, 400, 400, "" );
> scroll.type( Fl_Scroll::BOTH );
> TaskDrawingPanel panel( 0,0, 500, 500, "Panel" );
> scroll.callback( (Fl_Callback*)resize_callback, (void*)("test") );
> scroll.end();
>
> mainWin.resizable( scroll );
> mainWin.show( argc, argv );
> return Fl::run();
> }
>
> And that's the TaskDrawingPanel class:
>
> class TaskDrawingPanel : public Fl_Widget
> {
> void draw() {
> draw_box();
> fl_rect( 20, 20, 100, 100, FL_RED );
> }
>
> public:
> TaskDrawingPanel(int X,int Y,int W,int H,const char* L) :
> Fl_Widget(X,Y,W,H,L) {
> align(FL_ALIGN_TOP);
> box(FL_FLAT_BOX);
> color(FL_WHITE);
> }
> virtual ~TaskDrawingPanel() {}
>
> protected:
> private:
> };
>
>
>
>
>
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev