Positions Relative to Other Widgets

 

There are four properties that control position of a widget in relation to other widgets:

• indicates that the widget should be placed above the widget referenced in the property.

• indicates that the widget should be placed below the widget referenced in the property.

• indicates that the widget should be placed to the left of the widget referenced in the property.

• indicates that the widget should be placed to the right of the widget referenced in the property.

There are five additional properties that can control one widget’s alignment relative to another:

• indicates that the widget’s top should be aligned with the top of the widget referenced in the property.

• indicates that the widget’s bottom should be aligned with the bottom of the widget referenced in the property.

• indicates that the widget’s left side should be aligned with the left side of the widget referenced in the property.

• indicates that the widget’s right side should be aligned with the right side of the widget referenced in the property.

• indicates that the baselines of the two widgets should be aligned.

The last property in the list is useful for aligning labels and fields so that the text appears “natural.” Since fields have a box around them and labels do not, will align the top of the field’s box with the top of the label, which will cause the text of the label to be higher on‑screen than the text entered into the field.

So, if we want Widget B to be positioned to the right of Widget A, in the XML element for Widget B we need to include (assuming is the identity of Widget A).

 








Дата добавления: 2015-05-16; просмотров: 614;


Поиск по сайту:

При помощи поиска вы сможете найти нужную вам информацию.

Поделитесь с друзьями:

Если вам перенёс пользу информационный материал, или помог в учебе – поделитесь этим сайтом с друзьями и знакомыми.
helpiks.org - Хелпикс.Орг - 2014-2024 год. Материал сайта представляется для ознакомительного и учебного использования. | Поддержка
Генерация страницы за: 0.004 сек.