Thursday, November 19, 2015

CheckBox အသံုးျပဳနည္း

CheckBox အသံုးျပဳနည္း

Main
====

AddLabel("lbl1",0,0,100%x,10%y,"")
SetText("lbl1","Choose the fruits you like.")
AddCheckBox("cb1",0,10%y,100%x,10%y,"")
SetText("cb1","Apple")
AddCheckBox("cb2",0,20%y,100%x,10%y,"")
SetText("cb2","Banana")
AddCheckBox("cb3",0,30%y,100%x,10%y,"")
SetText("cb3","Grape")
AddCheckBox("cb4",0,40%y,100%x,10%y,"")
SetText("cb4","Orange")
AddButton("btn1",0,50%y,100%x,10%y,"")
SetText("btn1","OK")

txt=""

======
Events
======
Sub Activity_Pause(UserClosed)
End Sub

Sub Activity_Resume
End Sub

Sub Button_Click(Who)
txt="The fruits you like : " & crlf
if getChecked("cb1") then
txt=txt & getText("cb1") & crlf
end if
if getChecked("cb2") then
txt=txt & getText("cb2") & crlf
end if
if getChecked("cb3") then
txt= txt & getText("cb3") & crlf
end if
if getChecked("cb4") then
txt=txt& getText("cb4") & crlf
end if
MsgBox(txt,"")
End Sub

Sub Check_Change(who, Checked)
End Sub

========

No comments:

Post a Comment