edit field, Keyboard does not close when you click "Done"
Delphi iOS Native Components
Brought to you by:
b_yaghobi
Whenever i type into an edit field and the Keyboard pops up, it does not close when i click done. If its a text keyboard then i can click "return" and this will close the keyboard, but if its numerical, there is no return key so there is no way to close the keyboard.
Delphi XE4, Windows XP, Mac OS X. Tested on simulator. I have not tried this on the actual device.
Hi, Tyson
The default keyboard created by FM and it's a bug in the hide keyboard!
if you want to add a custom button to keyboard for close it use this:
uses
FMX.VirtualKeyboard,
FMX.Platform,
FMX.VirtualKeyboard.iOS;
....
procedure TForm1.CloseKeyboard( Sender: TObject );
begin
TUIApplication.Wrap( TUIApplication.OCClass.SharedApplication ).keyWindow.endEditing( true );
end;
// ------------------------------------------------------------------------------
procedure TForm1.FormOnShow( Sender: TObject );
var
VirtualKeyboardToolbarService: IFMXVirtualKeyboardToolbarService;
begin
if not FCloseButtonAdded and TPlatformServices.Current.SupportsPlatformService( IFMXVirtualKeyboardToolbarService, IInterface( VirtualKeyboardToolbarService ) ) then
begin
VirtualKeyboardToolbarService.AddButton( 'Close', CloseKeyboard );
end;
end;
regards
Hi Babak, any update on the fix for this bug? This bug also occurs with TDPFTextView also.
Hi,
Simple way you can down attachment file and put inside your project folder!
regards
Work!! Thanks!! This was something that was keeping me from switching to the components. But i'm switching now so will report on anything that i run across.
Keep up the great work!