Hi every body
I have a CAlert class with this code:
Then i call the class from Main module:
In designer, Label1 height was 30. but when i want to change at runtime with different value it does not affect, why ?
Thanks
I have a CAlert class with this code:
B4X:
Sub Class_Globals
Private fx As JFX
Dim mParent As Form
Private Label1 As Label
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(Parent As Form)
mParent = Parent
End Sub
Sub Show
Dim xui As XUI
Dim p As B4XView = xui.CreatePanel("")
p.LoadLayout("1")
mParent.RootPane.AddNode(p,0,0,mParent.Width, mParent.Height)
Label1.PrefHeight = 100 '<-- no affect
End Sub
Then i call the class from Main module:
B4X:
Sub MainForm_MouseClicked (EventData As MouseEvent)
Dim c As CAlert
c.Initialize(MainForm)
c.Show
End Sub
In designer, Label1 height was 30. but when i want to change at runtime with different value it does not affect, why ?
Thanks