Window

Lesson 2: Creating a window

Example code:

from fltk import *

#               x   y   w   h    title
win = Fl_Window(300,300,400,250,'This is my program' )

win.begin()
but = Fl_Button(100,100,170,40,'click')
win.end()

but.align(FL_ALIGN_TOP | FL_ALIGN_LEFT)
mycolor=fl_rgb_color(59,214,50)
but.color(mycolor, FL_RED) #second color is when selected
but.labelsize(40)
but.labelfont(FL_COURIER)
but.labelcolor(FL_GREEN)
but.box(FL_OVAL_BOX)
but.clear_visible_focus()

win.show()
Fl.run()