Hello
I try this code adapted from a Klaus post
I don't understand what is the difference between my code and the Klaus code, but mine give me an error : "Object should be first initialized (panel)"
Any idea of my mistake ?
I try this code adapted from a Klaus post
B4X:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
' nécessaire pour dessiner la courbe
Dim tableau As Canvas
Dim courbe As Path
Dim Panneau As Panel
Dim Image As Bitmap
'objects graphiques
Dim lblDate As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("formHistory")
' Affichage de la date du jour
'------------------------------
DateTime.DateFormat = "dd/MM/yyyy"
lblDate.Text=DateTime.Date(DateTime.Now)
' Création de la zone de dessin
'-------------------------------
Panneau.Width = 300
Panneau.Left = 0
Panneau.Top = 360
Panneau.Height = 140
tableau.Initialize(Panneau)
Image.Initialize3(tableau.Bitmap)
End Sub
I don't understand what is the difference between my code and the Klaus code, but mine give me an error : "Object should be first initialized (panel)"
Any idea of my mistake ?