2Pascal-新时代的Pascal

 找回密码
 立即注册
搜索
热搜: fastreport
查看: 1134|回复: 0
打印 上一主题 下一主题

XE8UP1添加View的问题

[复制链接]

33

主题

59

帖子

348

积分

版主

Rank: 7Rank: 7Rank: 7

积分
348
跳转到指定楼层
楼主
发表于 2015-7-13 12:10:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
京东购书支持本站
公司测试用的平板是小米的
pp1:326
分辨率:2048*1536
想要自己添加个View,都是根据帮助文档来的

[mw_shl_code=delphi,true]unit MyViews;

interface
const
  MiPAD = 'MIPAD'; // The unique name of the view, it has to be the same name as the one written between <Name></Name> tags of the DevicePreset.xml file.

implementation

uses

  system.Devices, system.Types, system.SysUtils;


type
  TDeviceRec = record
    ID: string;
    DevClass: TDeviceInfo.TDeviceClass;
    MinLogicalSize, MaxLogicalSize: TSize;
    MinPhysicalSize, MaxPhysicalSize: TSize;
    PPI: Integer;
    Exclusive: Boolean;
  end;

const
  DeviceCount = 1;
  Devices: array[0..DeviceCount - 1] of TDeviceRec =(
  (ID: MiPAD; DevClass: TDeviceInfo.TDeviceClass.Tablet;
     MinLogicalSize: (cx: 1024; cy: 768); MaxLogicalSize: (cx: 1024; cy: 768);
     MinPhysicalSize: (cx: 2048; cy: 1536); MaxPhysicalSize: (cx: 2048; cy: 1536); PPI: 326; Exclusive: False)
  );
initialization

  TDeviceinfo.AddDevice(TDeviceinfo.TDeviceClass.Tablet, MiPAD,
    Devices[0].MinPhysicalSize, Devices[0].MinLogicalSize, // MinPhysicalSize(max, min), MinLogicalSize(max, min)
    Devices[0].MaxPhysicalSize, Devices[0].MaxLogicalSize, // MaxPhysicalSize(max,min), MaxLogicalSize(max,min)
    TOSVersion.TPlatform.pfAndroid, Devices[0].PPI,Devices[0].Exclusive); //Select the platform and the pixel density.

finalization

  TDeviceinfo.RemoveDevice(MiPAD); // To unregister the view after unistalling the package.

end.[/mw_shl_code]


FormDesigner中的宽度高度我按1024*768弄的


可是测试程序生成之后用的是Master,而不是我做的这个,是什么问题

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|新时代Pascal论坛

GMT+8, 2024-5-18 13:18 , Processed in 0.056813 second(s), 25 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表