D Derek Jee Active Member Licensed User Longtime User Jul 18, 2015 #1 Hi all Can anyone tell me how to add the ADP in code as I can't seem to find any examples. The intro page says it is better to do it in the designer but I have already designed it in code. Thank you Derek.
Hi all Can anyone tell me how to add the ADP in code as I can't seem to find any examples. The intro page says it is better to do it in the designer but I have already designed it in code. Thank you Derek.
Erel B4X founder Staff member Licensed User Longtime User Jul 19, 2015 #2 Something like: Code: Dim adp3 As AnotherDatePicker adp3.Initialize(Me, "adp3") adp3.AddToActivity(Activity, label1) 'label1 is an existing label Upvote 0
Something like: Code: Dim adp3 As AnotherDatePicker adp3.Initialize(Me, "adp3") adp3.AddToActivity(Activity, label1) 'label1 is an existing label
pesquera Active Member Licensed User Longtime User Mar 23, 2016 #4 Erel said: Code: adp3.AddToActivity(Activity, label1) 'label1 is an existing label Click to expand... Hi, I also need to implement this class without the designer.. but, I had not the "AddToActivity" method What am I missing? Attachments ADP.png 7.2 KB · Views: 364 Upvote 0
Erel said: Code: adp3.AddToActivity(Activity, label1) 'label1 is an existing label Click to expand... Hi, I also need to implement this class without the designer.. but, I had not the "AddToActivity" method What am I missing?
DonManfred Expert Licensed User Longtime User Mar 23, 2016 #5 Try Code: Activity.AddView(adp3,left, top, w, h) Upvote 0
pesquera Active Member Licensed User Longtime User Mar 23, 2016 #6 [ DonManfred said: Try Code: Activity.AddView(adp3,left, top, w, h) Click to expand... Thanks for your soon response.. but, I got this error: java.lang.IllegalArgumentException: method anywheresoftware.b4a.objects.ActivityWrapper.AddView argument 1 has type android.view.View, got agendame.turnos.anotherdatepicker Upvote 0
[ DonManfred said: Try Code: Activity.AddView(adp3,left, top, w, h) Click to expand... Thanks for your soon response.. but, I got this error: java.lang.IllegalArgumentException: method anywheresoftware.b4a.objects.ActivityWrapper.AddView argument 1 has type android.view.View, got agendame.turnos.anotherdatepicker
Erel B4X founder Staff member Licensed User Longtime User Mar 23, 2016 #7 Why do you want to add it without the designer? You can create an empty layout with only ADP and add it this way. Upvote 0
Why do you want to add it without the designer? You can create an empty layout with only ADP and add it this way.
pesquera Active Member Licensed User Longtime User Mar 23, 2016 #8 Erel said: Why do you want to add it without the designer? You can create an empty layout with only ADP and add it this way. Click to expand... I already did the Activity by code, having a button above the list view Wanted to show the calendar with that button, then fill that list view with the selected day How can I then handle ADP? Thanks for your help Edited: done! thanks very much.. this code is on the button event Code: Activity.LoadLayout("1") glo_lst_DatePicker = Array(glo_DatePicker1) glo_DatePicker1.Show Upvote 0
Erel said: Why do you want to add it without the designer? You can create an empty layout with only ADP and add it this way. Click to expand... I already did the Activity by code, having a button above the list view Wanted to show the calendar with that button, then fill that list view with the selected day How can I then handle ADP? Thanks for your help Edited: done! thanks very much.. this code is on the button event Code: Activity.LoadLayout("1") glo_lst_DatePicker = Array(glo_DatePicker1) glo_DatePicker1.Show
Erel B4X founder Staff member Licensed User Longtime User Mar 23, 2016 #9 Like any other view. Add it with the designer and right click to generate the variable. If you want to change its position in your code then you will need to make targetLabel a public variable and then do something like: Code: Dim p As Panel = ADP.targetLabel.Parent Now you can move p as needed. Upvote 0
Like any other view. Add it with the designer and right click to generate the variable. If you want to change its position in your code then you will need to make targetLabel a public variable and then do something like: Code: Dim p As Panel = ADP.targetLabel.Parent Now you can move p as needed.