diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-24039DCE-B5C4-46CB-9E02-AB421C64FB87.dita --- a/Symbian3/SDK/Source/GUID-24039DCE-B5C4-46CB-9E02-AB421C64FB87.dita Wed Mar 31 11:11:55 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-24039DCE-B5C4-46CB-9E02-AB421C64FB87.dita Fri Jun 11 12:39:03 2010 +0100 @@ -1,53 +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.

+ + + + + +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):

+
    +
  • A is a top-level control and owns a window

    +
  • +
  • Child controls B and C do not create their +own windows in this example.

  • +
  • B, a child control of A, does not create a +window, and it has a child control, C.

    + +

    B's window is set calling the CCoeControl::SetContainerWindowL(A) method +and C's window is set with CCoeControl::SetContainerWindowL(B). +Then C's position (p) is relative to A, since it is the actual +window owner. A's position (m) is relative to the display position.

    +
    +
  • +
+

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