Making a Tabhost on 2.1.1
'ပထမဆံုး TBH အမည္ TabHost တခုလုပ္မယ္။
'-------- Add TabHost TBH ---------
AddTabHost("TBH",0,0,100%x,100%y,"")
'TBH ထဲမွာ Tab 3ခု (Panel 3ခု) လုပ္ယူမယ္။
'3ခုဆိုတာ နမူနာ လိုသေလာက္လုပ္ယူပါ
'------Create 3 Panel in TBH -------
AddTab("Page 1" ,"Pnl1", "TBH")
AddTab("Page 2", "Pnl2", "TBH")
AddTab("Page3", "Pnl3", "TBH")
TBH ထဲမွာ လုပ္ယူထားတဲ႕ Panel တခုခ်င္းေပၚကို View ေတထည့္မဟ္။ နမူနာ Button ေတထည့္ျပထားတာပါ။
'------- Add Views to Panels ----------
AddButton("btn1",10%x,10%y,80%x,10%y, "Pnl1")
SetText("btn1", "Page1")
AddButton("btn2",10%x,10%y,80%x,10%y, "Pnl2")
SetText("btn2", "Page2")
AddButton("btn3",10%x,10%y,80%x,10%y, "Pnl3")
SetText("btn3", "Page3")
No comments:
Post a Comment