2013-05-28 50 views
1

Monte的移動應用程序框架(mApp)可以以表格的形式處理數據網格,因爲它可以直接縮放各種屏幕尺寸和分辨率。mApp移動應用框架可用於數據網格表格佈局?

我們需要做些什麼才能使它與datagrid表格佈局一起工作好嗎?即我們也可以將它用於表單佈局內容嗎?如果是這樣,怎麼樣?

歡呼聲中,阿蘭

回答

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