home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pgehdl.zip / README < prev    next >
Text File  |  1996-02-27  |  2KB  |  65 lines

  1. NAME: pgehdl.zip (an example of a wrapper non-visual part for IPageHandler )
  2.  
  3. COPYRIGHT:
  4. ----------
  5. Copyright (C) International Business Machines Corp., 1991,1995.
  6.  
  7. DISCLAIMER OF WARRANTIES:
  8. -------------------------
  9. The following [enclosed] code is sample code created by IBM
  10. Corporation.  This sample code is not part of any standard IBM product
  11. and is provided to you solely for the purpose of assisting you in the
  12. development of your applications.  The code is provided "AS IS",
  13. without warranty of any kind.  IBM shall not be liable for any damages
  14. arising out of your use of the sample code, even if they have been
  15. advised of the possibility of such damages.
  16.  
  17.  
  18. DESCRIPTION:
  19.  
  20. The sample contains a wrapper non-visual part for IPageHandler. If your app
  21. needs to be notified when a tab or page button on a notebook is selected,
  22. then this part is for you.  The sample was built using the VAC++ v3.0
  23. with all the latest FixPaks applied as of 02/26/96.
  24.  
  25.  
  26. How to build the wrapper part:
  27.  
  28.  - take a look at pagehdl.vbb, pghndler.hpv and pghndler.cpv.
  29.  - If the part has all features you need, you don't need to rebuild
  30.    it.
  31.  
  32.  
  33. How to use this wrapper part in a VB part:
  34.  
  35.  - copy all pghndler.* files to the current working directory.
  36.  - Load up pagehdl.vbb in the VB main dialog box.
  37.  - Open/create a visual part that you want to attach the pagehandler part.
  38.  - Add/Drop APageHandler part onto the f/f surface.
  39.  - Attach the notebook to the pagehandler part : i.e
  40.     - connect an event (i.e readyEvent ) -> APageHandler(startHandle)
  41.     - connect notebook(this) -> above connection(notebk)
  42.  
  43.  - The pagehandler part has 3 predefined page selected events
  44.    (page1SelectedEvent, page2SelectedEvent, and page3SelectedEvent )
  45.  
  46.    You connect these events to your own methods/actions for special processing
  47.    when a tab is selected.
  48.  
  49.  - If you have more than 3 pages in the notebook, you can
  50.  
  51.     - add the new page events , save and generate "Feature source" for these events
  52.       and then update the APageHandler::setCurrentPageNumber() method in pghndler.cpv
  53.       to send out these new event.
  54.  
  55.  
  56.     or
  57.  
  58.     - use the generic anyPageSelectedEvent which contains the selected page number
  59.       in the IEventData object.  Take a look at the sample in test.vbb on how to get
  60.       the selected page number.
  61.  
  62.  
  63. This sample was created by Brian Luc, bluc@vnet.ibm.com
  64. Feb 26, 1996.
  65.