Sub b_4_click
s_panel_message.AddView(s_panel_message_sal.AsView, 0,0,100%x, 100%y)
Dim Cursor1 As Cursor
Dim p_tmp As Panel
Dim stmp As String
Cursor1 = SQL.ExecQuery("select rowid, * from na_msgoff ")
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
stmp = Cursor1.GetString("mo_msg")
p_tmp = addmessage(stmp)
s_panel_message_sal.Add(p_tmp, p_tmp.height, Cursor1.GetString("rowid"))
Next
p_tmp = s_panel_message_empty
s_panel_message_sal.Add(p_tmp, p_tmp.height, "")
End Sub
Sub addmessage(vmsg As String) As Panel
Dim p_tmp As Panel
Dim str1 As EditText
p_tmp.Initialize("")
p_tmp.Color = Colors.RGB(235, 151, 15)
str1.Initialize("str1")
str1.Color = Colors.Red
str1.TextColor = Colors.White
str1.Gravity = Gravity.TOP + Gravity.LEFT
str1.width = objwidth
str1.Height = 150dip
str1.text = vmsg
str1.Enabled = False
p_tmp.AddView(str1,leftstart,10dip,t_1.width, t_1.Height)
p_tmp.height = str1.Height + lspace
Return p_tmp
End Sub
Sub s_panel_message_sal_ItemClick (Index As Int, Value As Object)
log(Index)
End Sub