
#include once "inc/iup.bi"

sub _init_ constructor
  IupOpen(0,0)
end sub

sub _exit_ destructor
  IupClose()
end sub

'
' main
'
dim as Ihandle ptr dlg, vbox1, vbox2, tabs1, tabs2, box

vbox1 = IupFrame(IupVBox(IupLabel("Inside Tab A"), IupButton("Button A", NULL), NULL))
vbox2 = IupVbox(IupLabel("Inside Tab B"), IupButton("Button B", NULL), NULL)

tabs1 = IupTabs(vbox1, vbox2, NULL)
IupSetAttributeId(tabs1, "TABTITLE",0, "Tab A")
IupSetAttributeId(tabs1, "TABTITLE",1, "Tab B")

vbox1 = IupVbox(IupLabel("Inside Tab C"), IupButton("Button C", NULL), NULL)
vbox2 = IupVbox(IupLabel("Inside Tab D"), IupButton("Button D", NULL), NULL)

IupSetAttribute(vbox1, "TABTITLE", "Tab C")
IupSetAttribute(vbox2, "TABTITLE", "Tab D")

tabs2 = IupTabs(vbox1, vbox2, NULL)
IupSetAttribute(tabs2, "TABTYPE", "LEFT")

box = IupHbox(tabs1, tabs2, NULL)
IupSetAttribute(box, "MARGIN", "10x10")
IupSetAttribute(box, "GAP", "10")

dlg = IupDialog(box)
IupSetAttribute(dlg, "TITLE", "IupTabs")
'IupSetAttribute(dlg, "SIZE", "200x80")

IupShowXY (dlg, IUP_CENTER, IUP_CENTER)
IupMainLoop ()

