I have a b4xlib for a customized date pick picker. Code and files are taken from XUI Views.b4xlib and altered.
All works perfectly fine in release mode, but in debug mode the buttons are not available, so I can't access them.
Attached the b4xlib file.
This is the code in Activity_Create:
This is the code that shows the date dialog:
Any idea what I might be doing wrong here?
RBS
All works perfectly fine in release mode, but in debug mode the buttons are not available, so I can't access them.
Attached the b4xlib file.
This is the code in Activity_Create:
B4X:
'these apply to PickDate.b4xlib, wich holds altered code from XUI Views.b4xlib
'-----------------------------------------------------------------------------
DialogB4X_Alt.Initialize(Activity)
DialogB4X_Alt.TitleBarColor = Colors.RGB(255, 255, 32) 'yellow
DialogB4X_Alt.TitleBarTextColor = Colors.Black
DialogB4X_Alt.BlurBackground = False
DialogB4X_Alt.OverlayColor = Colors.ARGB(0, 255, 255, 255) 'transparent white
DialogB4X_Alt.iAlterHeight = -40dip '<<<<<<< added as Public variable to B4XDialog_ALT class in PickDate.b4xlib
DateTemplate_Alt.Initialize
DateTemplate_Alt.MinYear = 1900
DateTemplate_Alt.MaxYear = 2030
DateTemplate_Alt.DaysInMonthColor = Colors.Black
DateTemplate_Alt.DaysInWeekColor = Colors.Blue
DateTemplate_Alt.SelectedColor = Colors.LightGray
'this will be False in debug mode, but True in release mode (!?)
'--------------------------------------------------------------------
Log("DateTemplate_Alt.btnToday.IsInitialized: " & DateTemplate_Alt.btnToday.IsInitialized)
This is the code that shows the date dialog:
B4X:
Sub btnDOBDialog_Click()
DialogB4X_Alt.Title = "Pick a DOB"
DialogB4X_Alt.BackgroundColor = Colors.RGB(255, 255, 224)
'No need for Cancel as DateTemplate_Alt has this button and also Today button and YearsFastbutton
'------------------------------------------------------------------------------------------------
Wait For (DialogB4X_Alt.ShowTemplate(DateTemplate_Alt, "", "", "")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
lblDOB2.Text = General.Ticks2String(DateTemplate_Alt.Date, "", False)
lXL_DOB = General.Ticks2ExcelDate(DateTemplate_Alt.Date)
DateTime.DateFormat = "dd/MMM/yyyy"
strDOB = DateTime.Date(DateTemplate_Alt.Date)
End If
End Sub
Any idea what I might be doing wrong here?
RBS