diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-24039DCE-B5C4-46CB-9E02-AB421C64FB87.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-24039DCE-B5C4-46CB-9E02-AB421C64FB87.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,53 @@ + + + + + +Relationship +between window controls +

When a control draws in the window of another control, the position +is relative to that window. If a control owns a window that is a child of +another window, that control's position is relative to the parent window; +however, if that control is a compound control, its child control's coordinates +are relative to its own parent control window position. Top-level window-owning +controls are displayed using a position relative to the display. In other +words, it uses the physical coordinates of the display.

+

The following figure illustrates this relationship.

+Relative positions of three controls where the top-level parent owns +the window +

Consider three controls, A, B, and C (shown in +the figure above):

+ +

However, if B is a child control of A but also has a window +of its own, it is a child window of A's window (as shown in the following +figure). Then if C is a child of B and sets its window by calling CCoeControl::SetContainerWindowL(B), +the position of C (p') is relative to B's window.

+Relative positions of three controls where a child owns a window +

As the example illustrates, a control position depends on the window +in which it is drawn. Therefore, you need to know the drawing window for each +control. It is an important issue when designing a UI layout. There are some +common controls that optionally may have their own window, such as menus, +dialogs, and scroll bars. The application framework handles drawing these +controls, as long as the appropriate resources and flags have been set. The CCoeControl::OwnsWindow() call +can be used to detect whether a control owns a window or not.

+
\ No newline at end of file