大悟还俗

邮箱 key_ok@qq.com 我的收集 http://pan.baidu.com/share/home?uk=1177427271
  新随笔  :: 联系 :: 订阅 订阅  :: 管理

 

 

 ① 就用那个bitmap设计工具,先打开vcl里的皮肤(..... \Embarcadero\RAD Studio\12.0\Redist\styles\vcl里)

 

 ② save as      转换成fmx里的.style文件

 

 ③ 用 stylebook控件里load这个转过来的皮肤  

 

 ④ 收工……    

 

  

styledestoolbar.png

 

在FireMonkey移动窗体设计器 双击stylebook1

 

选择stylebook1在下拉菜单

stylebookselecting.png  stylebook2.png

Using the preceding procedure as a guide:

  1. Drop four stylebooks on the form, one each for Windows, Mac OS X, Android, and iOS.
    You need to add a style book for each platform that you want to support.
  2. Load the custom Windows style in one Stylebook. Name it StyleBookWin.
  3. Load your custom Mac styles in the second StyleBook. Name it StyleBookMac.
  4. Load your custom Android styles in the third StyleBook. Name it StyleBookAndroid.
  5. Load your custom iOS styles in the fourth StyleBook. Name it StyleBookiOS.
  6. At run time, execute the following code (in Form.OnCreate for instance):
{$IFDEF MSWINDOWS}  
StyleBook := StyleBookWin;  
{$ENDIF}  
{$IFDEF MACOS}  
StyleBook := StyleBookMac;  
{$ENDIF}
{$IFDEF Android}
StyleBook := StyleBookAndroid;  
{$ENDIF}  
{$IFDEF iOS}
StyleBook := StyleBookiOS;  
{$ENDIF}

To set a style globally for all forms in the application, you can use the new TStyleBook.UseStyleManager property. Just set the following values:

  • StyleBookWin.UseStyleManager = True
  • StyleBookMac.UseStyleManager = True
  • StyleBookAndroid.UseStyleManager = True
  • StyleBookiOS.UseStyleManager = True

Use the $IFDEF code shown above.