Sub Globals
Dim ScrollView1 As ScrollView
Dim pnlHeader As Panel ' panel za glavo
Dim pnlTop As Panel ' panel za gumbe
Dim pnlGlava As Panel ' panel za Glavo naročila
Dim pnlNarocilo As Panel ' panel za seznam materiala
Dim lstNarocilo As List
End Sub
Sub Activity_Create(FirstTime As Boolean)
ScrollView1.Initialize(0)
scrollview1.Color=Colors.LightGray
pnlNarocilo=ScrollView1.Panel
pnlNarocilo.Color=Colors.Cyan
Activity.AddView(ScrollView1, 0dip, 27%y, 100%x, 84%y)
lstNarocilo.Initialize
pnlTop.Initialize("pnlTop")
activity.AddView(pnlTop, 0dip,0dip,activity.Width ,15%y)
pnlTop.Color=Colors.Yellow
pnlHeader.Initialize("pnlHeader")
pnlHeader.Color = Colors.Blue
Activity.AddView(pnlHeader,0dip,16%y,activity.Width,10%y)
End Sub
Sub btnNew_Click
Dim vrsta_1 As Int
Dim vrsta As Int
vrsta_1=pnlTop.Height + pnlHeader.Height
vrsta= ((lstNarocilo.Size*RowHeight)/3)+vrsta_1
Dim lblNo As Label
lblNo.Initialize("")
lblNo.Text = i
lblNo.TextColor=Colors.Black
lblNo.Gravity = Gravity.CENTER_HORIZONTAL
Log("lblNo: " & lblNo)
lstNarocilo.Add(lblNo)
Dim lblNaziv As Label
lblNaziv.Initialize("")
lblNaziv.Text = "Moj Material: " & i
lblNaziv.TextColor=Colors.Black
lblNaziv.Gravity = Gravity.LEFT
Log ("lblNaziv " & lblNaziv)
lstNarocilo.Add(lblNaziv)
Dim lblKolicina As Label
lblKolicina.Initialize("")
lblKolicina.Text="23"
lblKolicina.TextColor=Colors.Black
lblKolicina.TextSize=15
lblNaziv.Gravity = Gravity.LEFT
lstNarocilo.Add(lblKolicina)
'vrsta=lstChecks.Size*height
pnlNarocilo.AddView(lblNo, 0dip, vrsta, 20%x, RowHeight)
pnlNarocilo.AddView(lblNaziv, 20%x, vrsta, 60%x, RowHeight)
pnlNarocilo.AddView(lblKolicina,80%x,vrsta,20%x,RowHeight)
pnlNarocilo.Height = (lstNarocilo.Size * RowHeight)/3
end sub