Sub Globals
Dim imeglobal As IME
Private pnl_ground As Panel
Dim pnltop As Object
Dim pnl_ground as Panel
Dim su As StringUtils
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("frm_contentdetail")
imeglobal.Initialize("imeglobal")
imeglobal.AddHeightChangedEvent
End Sub
Sub imeglobal_HeightChanged (NewHeight As Int, OldHeight As Int)
pnltop = NewHeight
pnl_ground.Top = NewHeight - pnl_ground.Height
End Sub
Sub txb_content_TextChanged (Old As String, New As String)
Dim hoehe As Int
hoehe = su.MeasureMultilineTextHeight(txb_content,txb_content.Text )
Dim i As Int = IndexOfNth(txb_content.text, CRLF, 5)
If i < 1 Then
txb_content.Height = su.MeasureMultilineTextHeight(txb_content,txb_content.Text ) +20dip
' pnl_ground.Height = su.MeasureMultilineTextHeight(txb_content,txb_content.Text ) +20dip
pnl_ground.Top = pnltop - pnl_ground.Height
ToastMessageShow(pnltop, True)
'pnl_ground.Top = hoehe - pnl_ground.Height
'txb_content.Height = pnl_ground.Top - txb_content.Top
Else If i < 2 And i > 1 Then
'txb_content.Height = hoehe + 20dip
' pnl_ground.Height = hoehe + 20dip
txb_content.Height = su.MeasureMultilineTextHeight(txb_content,txb_content.Text ) +20dip
pnltop = pnltop +40
pnl_ground.Top = pnltop - pnl_ground.Height
'pnl_ground.Height = su.MeasureMultilineTextHeight(txb_content,txb_content.Text ) +20dip
ToastMessageShow(pnltop, True)
'pnl_ground.Top = pnltop +20dip
'pnl_ground.Top = hoehe - pnl_ground.Height
' txb_content.Height = pnl_ground.Top - txb_content.Top
Else If i < 3 And i > 2 Then
'txb_content.Height = hoehe + 20dip
'pnl_ground.Height = hoehe + 20dip
txb_content.Height = su.MeasureMultilineTextHeight(txb_content,txb_content.Text ) +20dip
'pnl_ground.Height = su.MeasureMultilineTextHeight(txb_content,txb_content.Text ) +20dip
'pnl_ground.Top = pnltop
'pnl_ground.Top = hoehe - pnl_ground.Height
'txb_content.Height = pnl_ground.Top - txb_content.Top
End If
End Sub