Hi Charles,
Here are the correct button.
include "iup.inc"
sys win
Sub Btn1_clicked() callback
static sys a
a +=1
PRINT "BUTTON 1 Event " + a "x pressed"
End Sub
Sub Btn2_clicked() callback
static sys a
a +=1
PRINT "BUTTON 2 Event " + a "x pressed"
End Sub
Sub Btn3_clicked() callback
static sys a
a +=1
PRINT "BUTTON 3 Event " + a "x pressed"
End Sub
IupOpen(0,0)
win=IupCreate("dialog")
IupSetAttributes win, "TITLE= Test Dialog, SIZE=300x"
horzbox = IupCreate("hbox")
IupSetAttributes(horzbox, "GAP=5")
btn1 = IupCreate("button")
IupSetAttributes(btn1, "TITLE=Button1, EXPAND=HORIZONTAL")
btn2 = IupCreate("button")
IupSetAttributes(btn2, "TITLE=Button2, EXPAND=HORIZONTAL")
btn3 = IupCreate("button")
IupSetAttributes(btn3, "TITLE=Button3, EXPAND=HORIZONTAL")
IupAppend(horzbox, btn1)
IupAppend(horzbox, btn2)
IupAppend(horzbox, btn3)
IupAppend(win, horzbox)
IupSetCallback(btn1,"ACTION", @Btn1_clicked)
IupSetCallback(btn2,"ACTION", @Btn2_clicked)
IupSetCallback(btn3,"ACTION", @Btn3_clicked)
IupShow(win)
IupMainLoop()
IupClose()
X