def create_form(self):
     self.pform = xfl.fl_bgn_form(xfl.FL_NO_BOX, 420, 360)
     xfl.fl_add_box(xfl.FL_UP_BOX, 0, 0, 420, 360, "")
     xfl.fl_add_input(xfl.FL_NORMAL_INPUT, 70, 300, 320, 30, "Name")
     xfl.fl_add_input(xfl.FL_NORMAL_INPUT, 70, 260, 320, 30, "Address")
     xfl.fl_add_input(xfl.FL_NORMAL_INPUT, 70, 220, 320, 30, "City")
     xfl.fl_add_input(xfl.FL_NORMAL_INPUT, 70, 180, 320, 30, "Country")
     psexobj = xfl.fl_add_select(xfl.FL_NORMAL_SELECT, 70, 130, \
             110, 30, "Sex")
     pmaleent = xfl.fl_add_select_items(psexobj, "Male%SM")
     xfl.fl_popup_entry_set_callback(pmaleent, self.cb)
     xfl.fl_popup_entry_set_state(pmaleent, xfl.FL_POPUP_NONE)    # 0
     xfl.fl_popup_entry_set_shortcut(pmaleent, "M")
     pfemaleent = xfl.fl_add_select_items(psexobj, "Female%SF")
     xfl.fl_popup_entry_set_callback(pfemaleent, self.cb)
     xfl.fl_popup_entry_set_state(pfemaleent, xfl.FL_POPUP_NONE)    # 0
     xfl.fl_popup_entry_set_shortcut(pfemaleent, "F")
     xfl.fl_set_object_shortcut(psexobj, "S", 1)
     pchildobj = xfl.fl_add_select(xfl.FL_MENU_SELECT, 280, 130, 110, 30, \
             "Children")
     xfl.fl_add_select_items(pchildobj, "Zero|One|Two|Three|Four|Many")
     xfl.fl_set_object_shortcut(pchildobj, "C", 1)
     xfl.fl_popup_set_title(xfl.fl_get_select_popup(pchildobj), "Kids")
     plicenceobj = xfl.fl_add_select(xfl.FL_NORMAL_SELECT, 280, 80, \
             110, 30, "Licence")
     xfl.fl_add_select_items(plicenceobj, "Yes|No")
     xfl.fl_set_select_policy(plicenceobj, xfl.FL_POPUP_DRAG_SELECT)
     pmarriedobj = xfl.fl_add_select(xfl.FL_DROPLIST_SELECT, 70, 80, \
             110, 27, "Married")
     xfl.fl_add_select_items(pmarriedobj, "Yes|No")
     self.preadyobj = xfl.fl_add_button(xfl.FL_NORMAL_BUTTON, 150, 20, \
             140, 30, "Quit")
     xfl.fl_set_object_callback(self.preadyobj, self.exitcb, 0)
     xfl.fl_end_form()
    def create_form(self):

        self.pform = xfl.fl_bgn_form(xfl.FL_NO_BOX, 720, 520)

        pobj = xfl.fl_add_box(xfl.FL_UP_BOX, 0, 0, 720, 520, "")
        xfl.fl_set_object_color(pobj, xfl.FL_BLUE, xfl.FL_COL1)

        pobj = xfl.fl_add_box(xfl.FL_DOWN_BOX, 10, 90, 700, 420, "")
        xfl.fl_set_object_color(pobj, xfl.FL_COL1, xfl.FL_COL1)

        pobj = xfl.fl_add_box(xfl.FL_DOWN_BOX, 10, 10, 700, 70, "")
        xfl.fl_set_object_color(pobj, xfl.FL_SLATEBLUE, xfl.FL_COL1)

        tobj[0] = xfl.fl_add_box(xfl.FL_UP_BOX, 30, 110, 110, 110, "Box")

        tobj[1] = xfl.fl_add_text(xfl.FL_NORMAL_TEXT, 30, 240, 110, 30, "Text")

        tobj[2] = xfl.fl_add_bitmap(xfl.FL_NORMAL_BITMAP, 40, 280, 90, 80, "Bitmap")
        xfl.fl_set_object_lcol(tobj[2], xfl.FL_BLUE)

        tobj[3] = xfl.fl_add_chart(xfl.FL_BAR_CHART, 160, 110, 160, 110, "Chart")

        tobj[4] = xfl.fl_add_clock(xfl.FL_ANALOG_CLOCK, 40, 390, 90, 90, "Clock")
        xfl.fl_set_object_dblbuffer(tobj[4], 1)

        tobj[5] = xfl.fl_add_button(xfl.FL_NORMAL_BUTTON, 340, 110, 120, 30, "Button")

        tobj[6] = xfl.fl_add_lightbutton(xfl.FL_PUSH_BUTTON, 340, 150, 120, 30, "Lightbutton")

        tobj[7] = xfl.fl_add_roundbutton(xfl.FL_PUSH_BUTTON, 340, 190, 120, 30, "Roundbutton")

        tobj[8] = xfl.fl_add_slider(xfl.FL_VERT_SLIDER, 160, 250, 40, 230, "Slider")

        tobj[9] = xfl.fl_add_valslider(xfl.FL_VERT_SLIDER, 220, 250, 40, 230, "Valslider")

        tobj[10] = xfl.fl_add_dial(xfl.FL_LINE_DIAL, 280, 250, 100, 100, "Dial")

        tobj[11] = xfl.fl_add_positioner(xfl.FL_NORMAL_POSITIONER, 280, 380, 150, 100, "Positioner")

        tobj[12] = xfl.fl_add_counter(xfl.FL_NORMAL_COUNTER, 480, 110, 210, 30, "Counter")

        tobj[13] = xfl.fl_add_input(xfl.FL_NORMAL_INPUT, 520, 170, 170, 30, "Input")

        tobj[14] = xfl.fl_add_nmenu(xfl.FL_NORMAL_NMENU, 400, 240, 100, 30, "Menu")

        tobj[15] = xfl.fl_add_select(xfl.FL_NORMAL_SELECT, 580, 250, 110, 30, "Select")

        tobj[16] = xfl.fl_add_timer(xfl.FL_VALUE_TIMER, 580, 210, 110, 30, "Timer")
        xfl.fl_set_object_dblbuffer(tobj[16], 1)

        tobj[17] = xfl.fl_add_browser(xfl.FL_NORMAL_BROWSER, 450, 300, 240, 180, "Browser")

        self.pexitob = xfl.fl_add_button(xfl.FL_NORMAL_BUTTON, 590, 30, 100, 30, "Exit")

        self.pbtypeob = xfl.fl_add_select(xfl.FL_NORMAL_SELECT, 110, 30, 130, 30, "Boxtype")
        xfl.fl_set_object_callback(self.pbtypeob, self.boxtype_cb, 0)
        xfl.fl_popup_set_title(xfl.fl_get_select_popup(self.pbtypeob), "Boxtype")

        self.pmodeob = xfl.fl_add_select(xfl.FL_NORMAL_SELECT, 370, 30, 130, 30, "Graphics mode")
        xfl.fl_set_object_callback(self.pmodeob, self.mode_cb, 0)
        xfl.fl_popup_set_title(xfl.fl_get_select_popup(self.pmodeob), "Graphics mode")

        xfl.fl_end_form()