I have a textfield which opens keypad when tapped anywhere on the screen, but i want to open the keypad when a different button is tapped. Button name is “editbtn”…
While you are creating Menu Button , you have added callback function with the name editclicked.
Where is the implementation method of editclicked function?
so when i tap the edit button the keypad is attached and i can edit the textfield, but after that whenever i touch anywhere on the screen keypad shows up…
so how to open the keypad only when button is tapped and not when touched anywhere on the scene?
oh yes there is no need for touch event listener, removed it and it worked, thanks…
but just for learning, by using touch event i want to open keypad,(i.e by touching the textfield) what should i modify, as in my code, if i touch anywhere the keypad pops up…
@mihir77: Were you successful with hiding the keypad when tapping on the other area on the screen ? I’m badly in need of solution. I also needed to open the keypad when tapping on a button (MenuItemImage) . I’m still unable make the keypad go away when tapping on the other screen area. @Gurudath: I was doing the same way you posted. Could you please help me on this. The keypad doesn’t go away when tapping on other area if it’s open by textField->openWithIME() .
Sorry for starting the old conversation again but I’m very badly stuck in here.
I have created TextField: textField = TextField::create(“input words here”,“Arial”,30);
When i click on any button am calling: textField->attachWithIME();
After that, when i click on other area automatically keypad gets hides.
When i checked case TextField::EventType::DETACH_WITH_IME: is also getting called.