{"id":3462,"date":"2016-01-20T14:35:18","date_gmt":"2016-01-20T06:35:18","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=3462"},"modified":"2016-01-20T14:35:18","modified_gmt":"2016-01-20T06:35:18","slug":"%e6%95%99%e7%a8%8b-fmx-%e5%ae%9e%e7%8e%b0%e7%ae%80%e5%8d%95%e7%9a%84%e7%8e%af%e5%bd%a2%e8%bf%9b%e5%ba%a6%e6%9d%a1","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=3462","title":{"rendered":"[\u6559\u7a0b] FMX-\u5b9e\u73b0\u7b80\u5355\u7684\u73af\u5f62\u8fdb\u5ea6\u6761"},"content":{"rendered":"<p>\u8c01\u8bf4\u8fdb\u5ea6\u6761\u4e00\u5b9a\u8981\u662f\u957f\u957f\u7684\u4e00\u6761\uff1f\u592a\u4e09\u4fd7\uff0c\u7279\u4e09\u4fd7\uff01\u4eca\u5929\uff0c\u5229\u7528 FMX \u6211\u4eec\u6765\u505a\u4e00\u4e2a\u73af\u5f62\u7684\u8fdb\u5ea6\u6761\u3002<\/p>\n<p>1\u3001\u521b\u5efa\u4e00\u4e2a\u7a7a\u767d\u7684 FMX \u5e94\u7528\uff08\u8fd9\u4e2a\u6b65\u9aa4\u7565\u8fc7\u4e86\uff0cNew-&gt;Project-&gt;Delphi Project-&gt;Multi-Device Application\uff09\uff1b<\/p>\n<p>2\u3001\u653e\u4e00\u4e2aTCircle\uff0c\u6211\u4eec\u547d\u540d\u4e3aclBase\uff0c\u5c06 Stroke \u7684 Kind \u5c5e\u6027\u8bbe\u7f6e\u4e3a None\uff0cFill \u5c5e\u6027\u4fee\u6539\u4e0b\uff0c\u7ed9\u6211\u4eec\u4e00\u4e2a\u559c\u6b22\u7684\u53d1\u578b\uff0c\u6bd4\u5982\u73a9\u4e0b\u6e10\u53d8\uff08Kind \u5c5e\u6027\u6539\u4e3aGradient\uff0c\u7136\u540e\u8bbe\u7f6e Gradient \u5c5e\u6027\u8c03\u6574\u6fc0\u53d8\u7684\u914d\u8272\uff09\uff0c\u53e6\u5916\u8bbe\u7f6e\u4e0b Width \u548c Height \u4e3a\u540c\u6837\u7684\u503c\uff1b<\/p>\n<p>3\u3001\u518d\u653e\u4e00\u4e2aTCircle\uff0c\u5c06\u5b83\u7684\u7236\u8c03\u6574\u4e3aclBase\uff0c\u6211\u4eec\u547d\u540d\u4e3aclMask\uff0cAlign \u8bbe\u7f6e\u4e3a Client\uff0c\u7136\u540e\u5c06Stroke\u540c\u6837\u8bbe\u7f6e\u4e3aNone\uff0c\u7136\u540e\u8bbe\u7f6e\u8bbe\u7f6e Fill \u5c5e\u6027\u4fee\u6539\u4e0b\uff0c\u505a\u4e3a\u73af\u5f62\u7684\u5185\u5708\u3002\u4e3a\u4e86\u5f62\u6210\u73af\u5f62\uff0c\u6211\u4eec\u5c06clMask\u7684Margins\u7684\u56db\u8fb9\u90fd\u8bbe\u7f6e\u621010\uff0c\u7f29\u8fdb\u5c31\u4fdd\u7559\u51fa\u4e86\u73af\u7684\u4f4d\u7f6e\u4e86\u3002<\/p>\n<p>4\u3001\u518d\u653e\u4e00\u4e2aTArc\uff0c\u5c06\u5b83\u7684\u7236\u8c03\u6574\u4e3aclBase\uff0c\u6211\u4eec\u547d\u540d\u4e3aacProgress\uff0cAlign \u8bbe\u7f6e\u4e3a Client\uff0c\u8bbe\u7f6e Stroke \u7684 Thickness \u503c\u4e3a10\u3002\u8bbe\u7f6e\u5b83\u7684\u989c\u8272\u4e3a\u534a\u900f\u660e\uff0c\u6bd4\u5982\u00a0#80000000\u3002\u7531\u4e8e\u6211\u4eec\u4e60\u60ef\u987a\u65f6\u9488\u4ece\u6b63\u4e2d\u7b970\uff0c\u6240\u4ee5\u8bbe\u7f6e StartAngle \u4e3a -90\uff0cEndAngle \u8bbe\u7f6e\u5148\u968f\u4fbf\u8bbe\u7f6e\u4e00\u4e2a\u503c\uff0c\u598245.<\/p>\n<p>5\u3001\u518d\u653e\u4e00\u4e2a TLabel\uff0c\u5c06\u5b83\u7684\u7236\u8c03\u6574\u4e3aclBase\uff0c\u6211\u4eec\u547d\u540d\u4e3alblHint\uff0c\u8bbe\u7f6e Align \u4e3aCenter\uff0cTextSettings \u7684 HorizAlign \u4e5f\u4e3a Center\uff0cText \u8bbe\u7f6e\u4e3a 0%\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u4e0a\u9762\u7684\u4e00\u5207\u5c31\u7eea\uff0c\u6211\u4eec\u5148\u770b\u4e00\u4e0b\u5927\u6982\u7684\u6548\u679c\uff1a<\/p>\n<p><a href=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2016\/01\/CircleProgress.jpg\" rel=\"attachment wp-att-3464\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3464 aligncenter\" src=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2016\/01\/CircleProgress.jpg\" alt=\"CircleProgress\" width=\"208\" height=\"194\" \/><\/a><\/p>\n<p>\u6211\u4eec\u73b0\u5728\u4e3a\u4e86\u6f14\u793a\u8fdb\u5ea6\u6761\u7684\u5b9e\u9645\u6548\u679c\uff0c\u6211\u4eec\u5728 acProgress.EndAngle \u4e0a\u6dfb\u52a0\u4e00\u4e2a FloatAnimation\uff08\u6211\u4eec\u547d\u540d\u4e3afaProgress\uff09\uff0c\u8ba9\u5b83\u4ece 0-&gt;360 \u4e4b\u95f4\u53d8\u5316\uff0cDuration \u8bbe\u7f6e\u7684\u7a0d\u957f\u4e00\u70b9\uff0c\u6bd4\u59825\u79d2\uff0cEnabled \u8bbe\u7f6e\u4e3aTrue\uff0cTrigger \u6539\u4e3a Visible=True\uff0c\u5176\u5b83\u5c5e\u6027\u770b\u7740\u8bbe\u7f6e\u5c31\u597d\u3002\u5728FloatAnimation.OnProcess \u4e8b\u4ef6\u4e2d\uff0c\u6dfb\u52a0\u4e0b\u9762\u7684\u4ee3\u7801\u6765\u66f4\u65b0 lblHint \u7684\u6587\u672c\uff1a<\/p>\n<pre class=\"lang:delphi decode:true \">procedure TForm1.faProgressProcess(Sender: TObject);\r\nbegin\r\nlblHint.Text:=IntToStr(Trunc(acProgress.EndAngle*100\/360))+'%';\r\nend;<\/pre>\n<p>OK\uff0c\u73b0\u5728\u8fd0\u884c\u7a0b\u5e8f\u770b\u6548\u679c\u5427\uff0c\u6211\u6293\u4e00\u4e2a Windows \u5e73\u53f0\u4e0b\u7684\u52a8\u753b\u622a\u56fe\u53c2\u8003\u6548\u679c\uff1a<\/p>\n<p><a href=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2016\/01\/circleprogress.gif\" rel=\"attachment wp-att-3465\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3465 aligncenter\" src=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2016\/01\/circleprogress.gif\" alt=\"circleprogress\" width=\"278\" height=\"212\" \/><\/a><\/p>\n<p>\u597d\u4e86\uff0c\u4e3a\u4e86\u91cd\u7528\u8fd9\u4e2a\u4e1c\u897f\uff0c\u4f60\u53ef\u4ee5\u5c06\u5b83\u505a\u6210\u4e00\u4e2aFrame\uff0c\u7136\u540e\u52a0\u4e00\u4e2a Progress \u5c5e\u6027\u6765\u6765\u4ee3\u66ff\u52a8\u753b\u6765\u4fee\u6539\u8fdb\u5ea6\u548c\u63d0\u793a\u3002\u9644\u4e0a <a href=\"http:\/\/pan.baidu.com\/s\/1hrgvUss\" target=\"_blank\">\u5168\u90e8\u6e90\u7801<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8c01\u8bf4\u8fdb\u5ea6\u6761\u4e00\u5b9a\u8981\u662f\u957f\u957f\u7684\u4e00\u6761\uff1f\u592a\u4e09\u4fd7\uff0c\u7279 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[145,69,8],"tags":[149,57,538,312],"class_list":["post-3462","post","type-post","status-publish","format-standard","hentry","category-android","category-c-builder","category-delphi","tag-fmx","tag-57","tag-538","tag-312"],"views":5016,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/3462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3462"}],"version-history":[{"count":2,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/3462\/revisions"}],"predecessor-version":[{"id":3466,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/3462\/revisions\/3466"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}