narek adonts Well-Known Member Licensed User Longtime User Nov 19, 2015 #1 Anyway to have the function viewWillDisappear with nativeobject? I tried to change the delegate of a Page but without success
Anyway to have the function viewWillDisappear with nativeobject? I tried to change the delegate of a Page but without success
Erel B4X founder Staff member Licensed User Longtime User Nov 19, 2015 #2 Why don't you use the Page_Disappear event? Upvote 0
narek adonts Well-Known Member Licensed User Longtime User Nov 19, 2015 #3 Because I want to call textview.resignFocus and on page_Diisappear it doesnt work. It should be called before the page disappeared. I am using the back button of NavigationController. I resolved this by setting textview..editable.false and after again textview.editable=true (to hide the keyboard) Upvote 0
Because I want to call textview.resignFocus and on page_Diisappear it doesnt work. It should be called before the page disappeared. I am using the back button of NavigationController. I resolved this by setting textview..editable.false and after again textview.editable=true (to hide the keyboard)
Erel B4X founder Staff member Licensed User Longtime User Nov 19, 2015 #4 The keyboard disappears automatically when the page is changed. If you want to prevent it from appearing again when you return to the page then you can use CallSubDelayed to hide it (call it from the Page_Appear event). Upvote 0
The keyboard disappears automatically when the page is changed. If you want to prevent it from appearing again when you return to the page then you can use CallSubDelayed to hide it (call it from the Page_Appear event).
narek adonts Well-Known Member Licensed User Longtime User Nov 19, 2015 #5 When I click on the back button and after going to the same page keyboard is still there. I didnt understood when I have to call CallSubDelayed. Upvote 0
When I click on the back button and after going to the same page keyboard is still there. I didnt understood when I have to call CallSubDelayed.
Erel B4X founder Staff member Licensed User Longtime User Nov 20, 2015 #6 In Page_Appear: Code: Sub pg_Appear CallSubDelayed(Me, "HideKeyboard") End Sub Sub HideKeyboard pg.ResignFocus End Sub Upvote 0
In Page_Appear: Code: Sub pg_Appear CallSubDelayed(Me, "HideKeyboard") End Sub Sub HideKeyboard pg.ResignFocus End Sub
narek adonts Well-Known Member Licensed User Longtime User Nov 20, 2015 #7 Yes I this but it hides the keyboard only after showing the page. Anyway I solved it by makin textview.editable=false when page disappear. But will be great to add more delegates to controls (like for textview) Upvote 0
Yes I this but it hides the keyboard only after showing the page. Anyway I solved it by makin textview.editable=false when page disappear. But will be great to add more delegates to controls (like for textview)
Erel B4X founder Staff member Licensed User Longtime User Nov 20, 2015 #8 I don't see how viewWillDisappear of the text field will help here. It will be called together with Page_Disappear (which is based on viewWillDisappear). Upvote 0
I don't see how viewWillDisappear of the text field will help here. It will be called together with Page_Disappear (which is based on viewWillDisappear).
narek adonts Well-Known Member Licensed User Longtime User Nov 20, 2015 #9 I thought it is based on viewDidDisppear. What I was meaning with more delegates is that for exemaple textview support only Click and Doubleclixk events. I changed to delegate of Textview to my module to be able to use the OnEdit,... events. It is not so difficult but anyway will be great to support more and more events for controls in b4i. Upvote 0
I thought it is based on viewDidDisppear. What I was meaning with more delegates is that for exemaple textview support only Click and Doubleclixk events. I changed to delegate of Textview to my module to be able to use the OnEdit,... events. It is not so difficult but anyway will be great to support more and more events for controls in b4i.