How do you stop virtual keyboard showing when text changed programmatically

Hi,

I have a TButton control that updates TMemo.text when pressed, however this causes the virtual keyboard to then show if its not presently visible or hide the virtual keyboard if its visible.

How do I keep the virtual keyboard in its current state of hiidden/visible when updating TMemo text programmatically?

Currently I'm using 

procedure TBSFRMMainiPad.genButtonMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Single);
begin

MyMemo.Text:='Some Text';

//leave the virtual keyboard in the state it was
FService.SetHideKeyboardButtonVisibility(not FService.IsHideKeyboardButtonVisible);

end;

However, this is a bit rubbish as the user can see the keyboard appearing and disappearing or visa versa.
0
Stuart
11/13/2013 10:37:18 PM
embarcadero.delphi.ios 412 articles. 0 followers. Follow

4 Replies
1155 Views

Similar Articles

[PageSpeed] 14

Stuart Cross wrote:

> However, this is a bit rubbish as the user can see the keyboard appearing and disappearing or visa versa.

Using XE5 Update 1 on iOS7, the issue doesn't happen for me.

-- 
Dave Nottage [TeamB]
Find tips and code samples at Delphi Worlds: 
http://delphi.radsoft.com.au/blog
0
Dave
11/14/2013 8:00:42 PM
> {quote:title=Dave Nottage wrote:}{quote}
> Stuart Cross wrote:
> 
> > However, this is a bit rubbish as the user can see the keyboard appearing and disappearing or visa versa.
> 
> Using XE5 Update 1 on iOS7, the issue doesn't happen for me.
> 
> -- 
> Dave Nottage [TeamB]
> Find tips and code samples at Delphi Worlds: 
> http://delphi.radsoft.com.au/blog

Cool thanks. No plans to upgrade to XE5 though.

Think the solution is going to be creating the buttons on the Virtual keyboard itself rather than using TButton control but may have the same effect.
0
Stuart
11/14/2013 10:52:15 PM
Stuart Cross wrote:

> Cool thanks. No plans to upgrade to XE5 though.

Just did it with XE4: Same result. Which version of Delphi are you using?

You might also like to post a test case in the attachments group.

-- 
Dave Nottage [TeamB]
Find tips and code samples at Delphi Worlds: 
http://delphi.radsoft.com.au/blog
0
Dave
11/15/2013 7:07:19 AM
> {quote:title=Dave Nottage wrote:}{quote}
> Stuart Cross wrote:
> 
> > Cool thanks. No plans to upgrade to XE5 though.
> 
> Just did it with XE4: Same result. Which version of Delphi are you using?
> 
> You might also like to post a test case in the attachments group.
> 
> -- 
> Dave Nottage [TeamB]
> Find tips and code samples at Delphi Worlds: 
> http://delphi.radsoft.com.au/blog

Apologies, looks like its not the setting of the text thats causing the is causing the issue, its the SetFocus command thats causing the problem

E.g.
MyMemo.SetFocus;
0
Stuart
12/5/2013 12:18:51 AM
Reply: