Thanks Erel,
Regarding a data file, are you referring to the map file method?
That does work, I have been using it so far.
However, I am not sure where the resulting MAP file is saved to. After I compile and run
it on the emulator, I check the project folders, and I do not see it. Do you know how I can declare this MAP file name and location?
Sub Activity_Create(FirstTime As Boolean)
' Save Button attributes
Map1.Initialize
Map1.Put("B1_Text", "Hello World" )
Map1.Put("B1_Width", 150 )
Map1.Put("B1_Height", 150 )
Map1.Put("B1_Left", 50 )
Map1.Put("B1_Top", 50 )
Map1.Put("B1_Enabled", True )
Map1.Put("B1_Visible", True )
Map1.Put("B1_Text_Size", 20 )
Map1.Put("B1_Text_Color", Colors.Yellow )
Map1.Put("B1_Color", Colors.Blue )
Map1.Put("B1_Bitmap_Enable", False )
Map1.Put("B1_Bitmap_File", "75x75_grey.PNG" )
Activity.LoadLayout("Layout1")
' Go to set button attributes
Set_Button1_State
End Sub
Sub Set_Button1_State
' Get Button1 ENABLED STATE
' If Button1 is ENABLED then load settings
If Map1.Get("B1_Enabled") = True Then
Button1.Text = Map1.Get("B1_Text")
Button1.Enabled = Map1.Get("B1_Enabled")
Button1.Visible = Map1.Get("B1_Visible")
Button1.TextSize = Map1.Get("B1_Text_Size")
Button1.Height = Map1.Get("B1_Height")
Button1.Width = Map1.Get("B1_Width")
Button1.Top = Map1.Get("B1_Top")
Button1.Left = Map1.Get("B1_Left")
If Map1.Get("B1_Bitmap_Enable") = True Then
Button1.SetBackgroundImage(LoadBitmap(File.DirAssets, Map1.Get("B1_Bitmap_File")))
Else
Button1.TextColor = Map1.Get("B1_Text_Color")
Button1.Color = Map1.Get("B1_Color")
End If
Else
' Button1 DISABLED Warn USER
Msgbox("WARNING", "Button1 DISABLED")
End If
End Sub