cklester Well-Known Member Licensed User Oct 6, 2020 #1 I can't find an example of how to use FileChooser from within a B4XPages module. In particular, I don't know how to get the Form "Owner" for this: B4X: Dim result as String = fc.ShowOpen(???) What I've done, that seems to be working, is made MainForm in the Main module public. Then I do this: B4X: Dim result as String = fc.ShowOpen(Main.MainForm) However, that doesn't feel right. What's the non-smelly way to do this?
I can't find an example of how to use FileChooser from within a B4XPages module. In particular, I don't know how to get the Form "Owner" for this: B4X: Dim result as String = fc.ShowOpen(???) What I've done, that seems to be working, is made MainForm in the Main module public. Then I do this: B4X: Dim result as String = fc.ShowOpen(Main.MainForm) However, that doesn't feel right. What's the non-smelly way to do this?
Erel B4X founder Staff member Licensed User Longtime User Oct 6, 2020 #2 You should use B4XPages.GetNativeParent(Me) to get the form. Upvote 0