GOTO WinMain

LABEL cmdAdd
TEXTFIELD_GETSTRING somewin handle=mytext,destvariable=somevar
LISTBOX_ADDSTRING somewin handle=mylist,text=somevar
GOTO WinReturn

LABEL cmdRemove
TEXTFIELD_GETSTRING somewin handle=mytext,destvariable=somevar
LISTBOX_REMOVESTRING somewin handle=mylist,text=somevar
GOTO WinReturn

LABEL lstClicked
LISTBOX_GETSTRING somewin handle=mylist,destvariable=somevar
TEXTFIELD_SETSTRING somewin handle=mytext,text=somevar
GOTO WinReturn

LABEL WinMain

   WINDOW_CREATE somewin name=Sample Window App,width=375,height=195,state=normal,icon=someicon.ico
TEXTFIELD_CREATE somewin handle=mytext,name=Stuff,x=15,y=15,width=100,height=25
   BUTTON_CREATE somewin name=Add,jump=cmdAdd,x=130,y=15,width=50,height=25
   BUTTON_CREATE somewin name=Remove,jump=cmdRemove,x=195,y=15,width=50,height=25
  LISTBOX_CREATE somewin handle=mylist,jump=lstClicked,x=15,y=50,width=230,height=100
    IMAGE_CREATE somewin image=someimage.jpg,x=260,y=0

LABEL WinReturn
IDLE WINDOWED

