With the Short_Options we get in the dialog from left to right:
The title, the current value of the variable to be changed and then the drop-down button to show the different options.
All works OK, except the the width of the view that holds the current value is too small, so the value is truncated.
I have the following 4 options:
14/12/2020
14/Dec/2020
Mon 14/12/2020
Mon 14/Dec/2020
to be picked to set the date format of a flexible table in my app.
When the current value is 14/12/2020 I get:
14/12/20..
The problem is I can't figure out what view holds the current value.
This is the Sub that loads and shows the dialog. None of the logs tells me what view I have to adjust to full current value showing.
RBS
The title, the current value of the variable to be changed and then the drop-down button to show the different options.
All works OK, except the the width of the view that holds the current value is too small, so the value is truncated.
I have the following 4 options:
14/12/2020
14/Dec/2020
Mon 14/12/2020
Mon 14/Dec/2020
to be picked to set the date format of a flexible table in my app.
When the current value is 14/12/2020 I get:
14/12/20..
The problem is I can't figure out what view holds the current value.
This is the Sub that loads and shows the dialog. None of the logs tells me what view I have to adjust to full current value showing.
B4X:
Private Sub btnGeneralSettings_Click
Dim n As Int
LoadPreferencesDialog(2, 35, 55, True)
Dim pd As Object = prefdialog.ShowDialog(arrOptions(iOptionsIndex), "OK", "CANCEL")
Dim pnl As B4XView = prefdialog.CustomListView1.GetPanel(20)
Log("pnl.GetView(0).Left: " & pnl.GetView(0).Left)
Log("pnl.GetView(0).Text: " & pnl.GetView(0).Text)
For Each v As B4XView In pnl.GetAllViewsRecursive
Log(n & ": pnl view left and width: " & v.Left & " - " & v.Width)
n = n + 1
Try
Log(n & ": v.Text: " & v.Text)
Catch
Log(n & ": error")
Continue
End Try
Next
n = 0
Dim lbl As B4XView = pnl.GetView(1)
'this view (lbl) has only one child view
'---------------------------------------
Log("lbl.Left: " & lbl.Left)
Log("lbl.Width: " & lbl.Width)
For Each v As B4XView In lbl.GetAllViewsRecursive
Log(n & "l: bl view left and width: " & v.Left & " - " & v.Width)
n = n + 1
Next
Log("lbl.Parent.Width: " & lbl.Parent.Width)
Log("Root.Width: " & Root.Width)
lbl.SetLayoutAnimated(0, 80dip, lbl.Top, 400dip, lbl.Height)
Wait For (pd) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
SaveOptions
End If
cMP.HideKeyboard
End Sub
RBS