Материал из Module developer
// Determining the device type (phone, tablet)
var my_resolution = B.GetResolutionType();
// The condition for selecting by the device type
if (my_resolution == B.RESOLUTION_TYPE.PHONE)
{
// Changing the wiget size for phones
IR.GetItem (""ErrorChanel" + moduleID).Width = IR.GetPage(2).Width * 50 / 100;
IR.GetItem (""ErrorChanel" + moduleID).Height = IR.GetPage(2).Height * 0.5;
}
else
{
// Changing the wiget size for tablets
IR.GetItem (""ErrorChanel" + moduleID).Width = IR.GetPage(2).Width * 1;
IR.GetItem (""ErrorChanel" + moduleID).Height = IR.GetPage(2).Height * 0.75;
};
