[英]Firemonkey and Mobile Navigation
I have an interesting observation and question, but first a comment. 我有一个有趣的观察和问题,但首先要发表评论。 I have been using Delphi for 14 years and have taken a job developing an iOS mobile application using XE5.
我已经使用Delphi已有14年了,并且已经开始使用XE5开发iOS移动应用程序。 This is my first time using FMX and frankly I feel like I am stepping back in time many moons ago.
这是我第一次使用FMX,坦率地说,我觉得自己要在许多月前退后。 In other words, if this is the future, then it feels like I have crippled.
换句话说,如果这是未来,那感觉就像我已经瘫痪了。 No problem though.
没问题。 Roll with the punches.
从容应对。 Developing in this brave new world is not just a job.
在这个勇敢的新世界中发展不仅仅是一项工作。 It is an adventure.
这是一次冒险。
Now my question. 现在我的问题。 Start a FMX mobile project using the "Header/Footer with Navigation" as your base.
以“带有导航的页眉/页脚”为基础启动FMX移动项目。 Then add an edit control (Edit1) to the first tab item.
然后将编辑控件(Edit1)添加到第一个选项卡项目。 Then set the tab control align to none and move it to the right until you can clearly see the form itself.
然后将选项卡控件的align设置为none,然后将其向右移动,直到您可以清楚地看到表单本身为止。 Then add an edit control (Edit2) to the form.
然后将编辑控件(Edit2)添加到窗体。
Now set the form's active control to Edit1 and run the app - no focus on Edit1. 现在,将窗体的活动控件设置为Edit1并运行应用程序-无需关注Edit1。 Now set the form's active control to Edit2 and run the app - focus is placed on Edit2.
现在将窗体的活动控件设置为Edit2并运行应用程序-焦点放在Edit2上。 Interesting.
有趣。 Tab is a foreign word to tablets, right?
Tab是平板电脑的外来词,对吗? Why have active control or even setfocus available?
为什么可以使用主动控制甚至setfocus? Is this an oversight by Embarcadero?
这是Embarcadero的疏忽吗? Any thoughts?
有什么想法吗?
Long story short I think they both have potential uses. 长话短说,我认为它们都有潜在的用途。
I use the SetFocus
call to manually show the keyboard. 我使用
SetFocus
调用手动显示键盘。 Lets say the user navigates to a page where they're 100% sure to be putting in their username (or any text), I'll use ctrl.SetFocus
to show the keyboard just to save them having to click (or is it press now?) on the edit. 假设用户导航到一个页面,在该页面上100%确保输入了用户名(或任何文本),我将使用
ctrl.SetFocus
来显示键盘,只是为了节省用户单击(或按现在吗?)。
I don't see ActiveControl
being as useful, but it could definitely still be used. 我不认为
ActiveControl
有用,但是肯定可以使用它。 You could possibly use it to set up some sort of tabbing like structure for when the user presses Next on the keyboard (when the edit's ReturnKeyType is rkNext
). 您可以使用它来设置某种类似于
rkNext
结构,以供用户在键盘上按Next(当编辑的ReturnKeyType为rkNext
)使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.