I am very new to B4i, and I was having trouble with a feature that worked very well for me in B4A.
I put a ScrollView in Panel1, and then put Panel2 in the ScrollView so that when the device is rotated, the user can use the ScrollView to work on my "form." The form is centered horizontally so it looks consistent on both iPhone and iPad. In the case of an iPhone 4, it would fill the width of the screen, but centered on an iPad.
For some reason, the ScrollView doesn't fill the width of Panel1, and so it clipped the right side of Panel2 which I ported over from my Android project using Bal2Bil.
Also, I couldn't scroll the content vertically of the ScrollView in Panel2 like I could with my Android version. I tried this on my iPad.
In summary, I have 2 issues and 2 questions:
[1] ScrollView would not fill the panel it is in. Panel1 was centered using 50%x.
[2] Content of Panel2 would not scroll up or down in ScrollView.
[3] Is there a way to get the width of the "Activity" or "Page"? I see the "Page1_Resize" event, but not sure how that could help with my ScrollView issue.
[4] How do I change the "Page Title" of a layout in the program loaded with X.RootPanel.LoadLayout("panelLayout")? I can change it in Designer, but I couldn't find a way to change/update it in the program.
Attached is a simple Project1 with the gist of what I'm trying to accomplish with ScrollView. I would appreciate your help.
Thank you!
KC
I put a ScrollView in Panel1, and then put Panel2 in the ScrollView so that when the device is rotated, the user can use the ScrollView to work on my "form." The form is centered horizontally so it looks consistent on both iPhone and iPad. In the case of an iPhone 4, it would fill the width of the screen, but centered on an iPad.
For some reason, the ScrollView doesn't fill the width of Panel1, and so it clipped the right side of Panel2 which I ported over from my Android project using Bal2Bil.
Also, I couldn't scroll the content vertically of the ScrollView in Panel2 like I could with my Android version. I tried this on my iPad.
In summary, I have 2 issues and 2 questions:
[1] ScrollView would not fill the panel it is in. Panel1 was centered using 50%x.
[2] Content of Panel2 would not scroll up or down in ScrollView.
[3] Is there a way to get the width of the "Activity" or "Page"? I see the "Page1_Resize" event, but not sure how that could help with my ScrollView issue.
[4] How do I change the "Page Title" of a layout in the program loaded with X.RootPanel.LoadLayout("panelLayout")? I can change it in Designer, but I couldn't find a way to change/update it in the program.
Attached is a simple Project1 with the gist of what I'm trying to accomplish with ScrollView. I would appreciate your help.
Thank you!
KC