Hello, could someone help me out in this question, is it possible to adjust the position of "b4xviews/PreferencesDialog"
permanently for example the parameter "top = 300" and including sub dialogs / b4xtemplates too ?
In my example I've created a preferences dialog with different types of fields in use.
The main dialog (first shown) with parameter top = 300 works well, but after click on
field date and show the AddDateItem view the top parameter will set back to original, and after
return to the main dialog top parameter too. See my screenshot story and example code.
permanently for example the parameter "top = 300" and including sub dialogs / b4xtemplates too ?
In my example I've created a preferences dialog with different types of fields in use.
The main dialog (first shown) with parameter top = 300 works well, but after click on
field date and show the AddDateItem view the top parameter will set back to original, and after
return to the main dialog top parameter too. See my screenshot story and example code.
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private xui As XUI
Private xview As B4XView
Private prefdlg As PreferencesDialog
Private prefdlgdata As Map
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.RootPanel.LoadLayout("Page1")
NavControl.ShowPage(Page1)
prefdlg_Create
End Sub
private Sub prefdlg_Create
Dim varList As List
varList.Initialize
varList.Add("Item 1")
varList.Add("Item 2")
varList.Add("Item 3")
varList.add("Item 4")
prefdlgdata.Initialize
prefdlg.Initialize(Page1.RootPanel,"New entry",300dip,250dip)
prefdlg.AddOptionsItem("event","Event",varList)
prefdlg.GetPrefItem("event").Required=True
prefdlg.AddDateItem("date","Date")
prefdlg.AddTimeItem("time","Time")
prefdlg.AddTextItem("note","Note")
End Sub
Sub Button1_Click
Dim varPdlg As Object = prefdlg.ShowDialog(prefdlgdata, "insert", "cancel")
prefdlg.Dialog.Base.Top = 300
Wait For (varPdlg) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
End If
End Sub