home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / drdc011.zip / Readme.txt < prev   
Text File  |  2002-03-21  |  5KB  |  175 lines

  1. User control for DrDialog V0.1.1
  2. --------------------------------
  3.  
  4. This Rexx DLL contains new controls for use with DrDialog.
  5. Use it by creating a user control when building your dialog
  6. in DrDialog. Have a look at the file Demo.res for more
  7. information.
  8.  
  9. Two controls are available:
  10.  
  11. -A pervent bar (DRD_PERCENTBAR)
  12. -A fly overhelp control (DRD_BUBBLEHELP)
  13.  
  14.  
  15. How to use it
  16. -------------
  17. In your init function register the new Rexx function "DRCtrlRegister"
  18. with Rexx and call it to register the new control with your DrDialog
  19. application. The control must be registered in every application because
  20. this call is local to the calling process.
  21.  
  22. NOTE:
  23.  
  24. The DLL must be in the current directory, the libpath
  25. or where the DrRexx.exe is.
  26.  
  27. The default DrDialog installation sets the working dir
  28. for DrRexx.exe to the installation directory. So loading may
  29. fail if you start your app with a double click. Copy
  30. the DLL to your DrDialog installation directory or change
  31. the working directory then.
  32.  
  33. /* Register the new function with Rexx */
  34. rc=RxFuncAdd("DRCtrlRegister", 'drusrctl' , "DRCtrlRegister")
  35.  
  36. /* Register the new control with your application */
  37. call DRCtrlRegister
  38.  
  39.  
  40. The following Rexxfunctions are available in the DLL:
  41.  
  42. DRCtrlDropFuncs:
  43.  
  44. Drop all registered functions.
  45.  
  46. DRCtrlRegister:
  47.  
  48. Register the new controls.
  49.  
  50. DRCtrlLoadFuncs:
  51.  
  52. Load the functions of this DLL.
  53.  
  54. DRCtrlVersion:
  55.  
  56. Query the release.
  57.  
  58. SAY DRCtrlVersion() returns "0.1.1" (or any other version number)
  59.  
  60.  
  61. 1. Percent bars
  62. ---------------
  63. You may change the colors by using the Color() function of DrDialog: 
  64.  
  65. /* Change color of bar */
  66. call Color '-','#255 0 0'
  67. /* Change color of text */
  68. call Color '+','#255 255 255'
  69.  
  70.  
  71. You may change the font of the text by using the Font() function of DrDialog:
  72.  
  73. /* Change font to 18.Helv */
  74. call Font '18.Helv'
  75.  
  76.  
  77. The value of each bar may be set using the Text() function:
  78.  
  79. /* Set bar to 30% */
  80. call Text '30'
  81.  
  82.  
  83. The label of each bar may be set using the Text() function:
  84.  
  85. /* Set bar to 30% and label to '3 of 10' */
  86. call Text '30#3 of 10'
  87.  
  88. The first part of the text string must be the value the bar should be set to.
  89. Everything after the '#' is printed as the label on the bar. You may use
  90. any text for the label or no label at all. If you don't want a label only
  91. set the value.
  92.  
  93.  
  94. 2.Flyover help window
  95. ---------------------
  96. Create a control of type DRD_BUBBLEHELP and set it as the default
  97. for hints:
  98.  
  99. call isDefault 'C'
  100. call isDefault 'D'
  101.  
  102. Now any hint specified for a control or dialog is shown as a fly over help
  103. at the position of the mouse pointer.
  104.  
  105. Use the following calls to customize the fly over help.
  106.  
  107.  
  108. You may change the colors by using the Color() function of DrDialog: 
  109.  
  110. /* Change background color */
  111. call Color '-','#255 0 0'
  112. /* Change foreground color of text */
  113. call Color '+','#255 255 255'
  114.  
  115.  
  116. You may change the font of the text by using the Font() function of DrDialog:
  117.  
  118. /* Change font to 18.Helv */
  119. call Font '18.Helv'
  120.  
  121.  
  122. Change the delay until the bubble opens using the Text() function:
  123.  
  124. /* Change the delay to 300 ms untill the bubble is opened */
  125. call Text "#delay 300"
  126.  
  127.  
  128. Change the time the bubble is shown:
  129.  
  130. /* Show the bubble for 2500 ms */
  131. call Text "#show 2500"
  132.  
  133.  
  134. License
  135. -------
  136. /*
  137.  * Copyright (c) Chris Wohlgemuth 2001 
  138.  * All rights reserved.
  139.  *
  140.  * http://www.geocities.com/SiliconValley/Sector/5785/
  141.  * http://www.os2world.com/cdwriting
  142.  *
  143.  * Redistribution and use in source and binary forms, with or without
  144.  * modification, are permitted provided that the following conditions
  145.  * are met:
  146.  * 1. Redistributions of source code must retain the above copyright
  147.  *    notice, this list of conditions and the following disclaimer.
  148.  * 2. Redistributions in binary form must reproduce the above copyright
  149.  *    notice, this list of conditions and the following disclaimer in the
  150.  *    documentation and/or other materials provided with the distribution.
  151.  * 3. The authors name may not be used to endorse or promote products
  152.  *    derived from this software without specific prior written permission.
  153.  *
  154.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  155.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  156.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  157.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  158.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  159.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  160.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  161.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  162.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  163.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  164.  * SUCH DAMAGE.
  165.  *
  166.  */
  167.  
  168.  
  169. Author
  170. ------
  171. Copyright Chris Wohlgemuth 2001-2002
  172.  
  173. http://www.geocities.com/SiliconValley/Sector/5785/
  174. http://www.os2world.com/cdwriting
  175.