xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Looking for simple example


From: jon
Subject: Re: [XForms] Looking for simple example
Date: Sat, 15 Nov 2014 14:08:31 +0000

My application is going well.

I have hit a snag I cant solve though.


I have "main" form (called mainform).  I have a number of other forms
that sit on top of the mainform using a tabfolder.

It all works well, the snag is I want to put a control in the top right
of the mainform (above the tabs).

buttondown.xpm and buttonup.xpm are < and > graphic symbols. 

What I wanted to do was to push the < and > buttons, but with the tabs
active only the form displayed inside the tab is processed. Any ideas if
I can do something to allow the objects on the mainform to remain
active ?

Thanks,
Jon


Excuse the scruffy formatting, mainform is created like this:

FD_mainform *
create_form_mainform( void )
{
        FL_OBJECT *obj;
        FD_mainform *fdui = ( FD_mainform * ) fl_malloc( sizeof *fdui );

        fdui->vdata = fdui->cdata = NULL;
        fdui->ldata = 0;
        fdui->mainform = fl_bgn_form( FL_NO_BOX, 764, 620 );

        obj = fl_add_box( FL_FLAT_BOX, 0, 0, 770, 620, "" );

    fdui->preset_down_btn = obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 600, 
0, 40, 28, "" );
    fl_set_pixmap_file( obj, "buttondown.xpm" );
    fl_set_object_boxtype( obj, FL_NO_BOX );
    fl_set_object_callback( obj, preset_down_btn_cb, 0 );

    fdui->preset_up_btn = obj = fl_add_pixmapbutton( FL_NORMAL_BUTTON, 660, 0, 
40, 28, "" );
    fl_set_pixmap_file( obj, "buttonup.xpm" );
    fl_set_object_boxtype( obj, FL_NO_BOX );
    fl_set_object_callback( obj, preset_up_btn_cb, 0 );

    fdui->preset_label = obj = fl_add_text( FL_NORMAL_TEXT, 640, 0, 20, 30, "0" 
);
    fl_set_object_boxtype( obj, FL_NO_BOX );
    fl_set_object_lsize( obj, FL_LARGE_SIZE );
    fl_set_object_lstyle( obj, FL_BOLD_STYLE );

    fdui->button_save = obj = fl_add_button( FL_NORMAL_BUTTON, 700, 0, 60, 30, 
"SAVE" );
    fl_set_object_color( obj, FL_COL1, FL_GREEN );
    fl_set_object_lsize( obj, FL_MEDIUM_SIZE );
    fl_set_object_callback( obj, button_save_cb, 0 );

        fdui->tabs = obj = fl_add_tabfolder( FL_TOP_TABFOLDER, 1, 1, 765, 620, 
"" );
        fl_set_object_callback( obj, tabs_cb, 0 );
        fl_addto_tabfolder(obj,"SETTINGS",fd_settings->settings);
        fl_addto_tabfolder(obj,"MIXER",fd_mixerform->mixerform);
        fl_addto_tabfolder(obj,"FX",fd_fxform->fxform);
        fl_set_folder(obj,fd_settings->settings);                               
// force tab to settings form

        tim = fl_add_timer(FL_HIDDEN_TIMER,100,0,0,0,"Time1");
        fl_set_object_callback(tim, idle_callback, 0);

        fl_end_form( );
        fdui->mainform->fdui = fdui;
        return fdui;
}






reply via email to

[Prev in Thread] Current Thread [Next in Thread]