[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  oWnd:setControl( <oControl> ) -> < nil >

------------------------------------------------------------------------------


 PARAMETER:

   <oControl>  is a reference to the new main control. This control will 
               be automatically sized to the client area of the mdi window, 
               and it will be activated / deactivates with the mdi window


 DESCRIPTION:

  This is one of the most interesting methods of this class. It lets you
  assign a control to the mdi window, that is automatically sized to the
  client area of the mdi window and automatically activated / deactivated
  as the window receives ::setfocus or ::lostfocus messages

  The reference to the control is stored in the instance var ::oControl


 EXAMPLE:

     +-------------------------------------------------------------+
     |  /* Create MDI Parent Window */                             |
     |  DEFINE WINDOW oWin FROM 1,1 TO 20, 60 ;                    |
     |   TITLE "Testing the MDI Window" ;                          |
     |   MDI ;                                                     |
     |   MENU BuildMenu()                                          |
     |                                                             |
     |  /* Create MDI ChildWindow */                               |
     |  DEFINE WINDOW oWinEdit MDICHILD OF oWin ;                  |
     |   FROM 2,2 TO 20,50 ;                                       |
     |   TITLE "I am the MDI Child"                                |
     |                                                             |
     |  /* Create a main Control and register it */                |
     |  @ 2, 0 LISTBOX oList FIELDS OF oWin  SIZE 300, 300         |
     |                                                             |
     |  oWin:SetControl( oList )                                   |
     |                                                             |
     |  /* Start the Action */                                     |
     |  ACTIVATE WINDOW oWin                                       |
     +-------------------------------------------------------------+



See Also: oControl
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson