简体   繁体   English

Firemonkey和移动导航

[英]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.

相关问题 在Delphi Firemonkey移动应用程序中读写inifile? - Read and writing a inifile in a Delphi Firemonkey Mobile Application? Firemonkey Mobile 中的 Bidi 从右到左语言 - Bidi Right to Left Language in Firemonkey Mobile FireMonkey TControl.MakeScreenshot在Mobile平台上生成一个尺寸不足的位图 - FireMonkey TControl.MakeScreenshot generates an undersized bitmap on Mobile platforms 使用Teechart时,Delphi Firemonkey移动应用程序将崩溃 - Delphi Firemonkey mobile app will crash when using Teechart 从手机网站到手机导航的链接 - link from mobile website to mobile phone navigation 在手机上浏览360张照片 - Navigation through 360 photos on mobile 如何使用RAD Studio FireMonkey在iOS和Android上启动Navigation应用程序? - How can I launch the Navigation app on iOS and Android with RAD Studio FireMonkey? 如何根据FireMonkey移动应用程序中的设备动态更改背景图像文件? - How can I change background image file dynamically depending on device in a FireMonkey Mobile Application? 如何在Firemonkey移动应用程序中获取手机的联系人列表? - How can I get a phone's contact list in a Firemonkey mobile application? 如何检测 Delphi Firemonkey 移动应用程序中 iOS 上的应用程序何时未从后台重新打开? - How to detect when app is not reopen from background on iOS in Delphi Firemonkey mobile app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM