1

Monte 的移动应用程序框架 (mApp) 可以与表格形式的数据网格一起使用,因为它可以直接缩放以适应各种屏幕尺寸和分辨率。

我们需要做些什么才能让它与 datagrid 表单布局一起工作?即我们也可以将它用于表单布局内容吗?如果是这样,怎么做?

干杯,艾伦

4

1 回答 1

0

mApp 完全没有针对 DataGrid 表格布局进行测试,我无法想象它们在移动设备上会有多大帮助。如果它有效,那就太好了。

对于表单布局,您只需要记住布局中的任何固定像素宽度都需要乘以 mAppPixelDensity() 然后四舍五入。模板会自动缩放。因此,默认的 LayoutControl 处理程序应更改为:

on LayoutControl pControlRect
    local theFieldRect

    -- This message is sent when you should layout your template's controls.
    -- This is where you resize the 'Background' graphic, resize fields and 
    -- position objects.
    -- For fixed height data grid forms you can use items 1 through 4 of pControlRect as
    -- boundaries for laying out your controls.
    -- For variable height data grid forms you can use items 1 through 3 of pControlRect as
    -- boundaries, expanding the height of your control as needed.

    -- Example:
    put the rect of field "Label" of me into theFieldRect
    put item 3 of pControlRect - round(5*mAppPixelDensity()) into item 3 of theFieldRect
    set the rect of field "Label" of me to theFieldRect

    set the rect of graphic "Background" of me to pControlRect
end LayoutControl
于 2013-05-29T01:24:16.623 回答