HI,
I am trying to get this customized message box to work.
I have made a layout in the designer with some labels.
Now I try to change the label text but get a error : java.lang.RuntimeException: Object should first be initialized (Label).
I think it is because my labels not initialized by the loadlayout when loaded.
But I can not figure out how to get this to work.
Anyone has any experience with his?
Mogens
I am trying to get this customized message box to work.
I have made a layout in the designer with some labels.
Now I try to change the label text but get a error : java.lang.RuntimeException: Object should first be initialized (Label).
I think it is because my labels not initialized by the loadlayout when loaded.
But I can not figure out how to get this to work.
B4X:
Private ASMsgBox1 As ASMsgBox
Dim year As String = "2012 - 2019"
ASMsgBox1.Initialize(Me,"ASMsgBox1")
ASMsgBox1.InitializeWithoutDesigner(Activity, 0xFFc0c0c0, True, False, False, 50%x, 440dip)
ASMsgBox1.LoadLayout("info")
ASMsgBox1.Header_Text = mtabout
'ASMsgBox1.HeaderColor = Colors.Green
ASMsgBox1.icon_set_icon(xui.LoadBitmap(File.DirAssets,"icon_info.png"))
ASMsgBox1.CenterDialog(Activity)
ASMsgBox1.CloseButtonVisible = True
ASMsgBox1.Show(True)
'ASMsgBox1.ShowWithText("Hello B4X!",True)
LabelInfoVersion.Text = Version
LabelInfoAppType.text = year
Wait For ASMsgBox1_result(res As Int)
Anyone has any experience with his?
Mogens