XForms: formbrowser and image form

From: jprinos@dehavilland.ca
Date: Tue May 09 2000 - 15:31:16 EDT

  • Next message: jprinos@dehavilland.ca: "XForms: more on formbrowser and image form"

    # To subscribers of the xforms list from jprinos@dehavilland.ca :

    Hello all, glad to be back...

    I'm writing an application which displays a honking big image (2000x1800 48bpp,
    RGB).

    I'm trying to put this form into a formbrowser. It seems to be working except
    that it doesn't scroll.

    I've seen other traffic on this list over this issue. I've checked and I don't
    us FL_NO_BOX anywhere. Is there a problem with the size or content in the form
    i'm trying to load into the formbrowser?

    Here's the relevant portion of my code:

    /* display the data */

        theinimage = fl_bgn_form(FL_DOWN_BOX,image->w,image->h);
        canvas = fl_add_canvas(FL_NORMAL_CANVAS,0,0,image->w,image->h,"");
        fl_end_form();

        fl_add_canvas_handler(canvas,Expose, expose_handle, 0);

        form_browser = fl_bgn_form(FL_DOWN_BOX,image->w/4,image->h/4);
        browser = fl_add_formbrowser(FL_NORMAL_FORMBROWSER, form_browser->x,
                     form_browser->y,form_browser->w,form_browser->h,"");
        fl_end_form();

        fl_set_formbrowser_scroll(browser, FL_SMOOTH_SCROLL);
        fl_addto_formbrowser(browser, theinimage);

        fl_show_form(form_browser, FL_PLACE_MOUSE,FL_FULLBORDER,infile);

        flimage_display(image, fl_get_canvas_id(canvas));

    /* the main fl_do_loop */
        fl_do_forms();

    as well

    static int expose_handle(FL_OBJECT *ob, Window win,
                             int w, int h, XEvent *xev, void *data)
    {
         if(image)
            flimage_display(image, win);
         return 0;
    }

    Thanks in advance,

    J0hn Prinos

    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Tue May 09 2000 - 15:42:39 EDT