home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / vpxtra.zip / vpibuttn.hlp (.txt) < prev    next >
OS/2 Help File  |  1994-04-14  |  8KB  |  267 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Overview of Image Button ΓòÉΓòÉΓòÉ
  3.  
  4. An image button is a button with a picture (in either ICON or BITMAP format) 
  5. instead of the usual text that is displayed. 
  6.  
  7. You can use an image button for a toolbar type control in your VisPro/REXX 
  8. application, or any place where an image would be more useful than text for a 
  9. button. 
  10.  
  11.  
  12. ΓòÉΓòÉΓòÉ 2. Style page for the Image Button ΓòÉΓòÉΓòÉ
  13.  
  14. There are no extra styles for the image button, the basic style are the only 
  15. ones that apply. 
  16.  
  17. Basic 
  18.  
  19. Tab stop 
  20.    Allows the user to tab to the Image Button.  It is a good idea to provide a 
  21.    tab stop for the first Image Button in a group. 
  22.  
  23. Group 
  24.    Allows the user to move within a group of objects using the arrow keys. 
  25.    Select Group if this Image Button is the only object in a group or if it is 
  26.    the first object in a group. 
  27.  
  28. Disabled 
  29.    The Image Button is present, but the user cannot select it. 
  30.  
  31. Visible 
  32.    The user can see the Image Button. 
  33.  
  34.  
  35. ΓòÉΓòÉΓòÉ 3. Events for Image Button ΓòÉΓòÉΓòÉ
  36.  
  37. The Image Button supports the following events: 
  38.  
  39. When Clicked/Selected 
  40.    The user clicks on the image button with the mouse, or selects the button 
  41.    using the space bar 
  42.  
  43.  
  44. ΓòÉΓòÉΓòÉ 3.1. When Clicked/Selected ΓòÉΓòÉΓòÉ
  45.  
  46. This event is generated by the user clicking on the image button with the 
  47. mouse, or selecting the button using the space bar when the button has focus. 
  48. You will need to place the actions to be performed when the user selects the 
  49. button in this event. 
  50.  
  51.  
  52. ΓòÉΓòÉΓòÉ 4. Methods for Image Button ΓòÉΓòÉΓòÉ
  53.  
  54. The Image Button supports the following methods: 
  55.  
  56. Get Item Value 
  57.    Returns the text associated with the image button (see in the development 
  58.    environment). 
  59.  
  60. Set Item Value 
  61.    Sets the text displayed on the image button until it is changed to either 
  62.    bitmap or icon format. 
  63.  
  64. Get item picture 
  65.    Returns a picture handle similar to that of VpLoadPicture for use in a 
  66.    VisPro/REXX application. 
  67.  
  68. Set item picture 
  69.    Sets the image for the button from an image loaded using VpLoadPicture. 
  70.    Please note that it is recommended that any images you know will be used in 
  71.    your application should be declared in the RESOURCE.VPR file. 
  72.  
  73. Set ICON format 
  74.    Tells the image button to display itself as an ICON. An image must already 
  75.    have been set using Set item picture. 
  76.  
  77. Reset ICON style 
  78.    Turns off the icon format for the image button - it should revert back to 
  79.    being a text button. 
  80.  
  81. Set BITMAP style 
  82.    Tells the image button to display itself as a BITMAP. An image must already 
  83.    have been set using Set item picture. 
  84.  
  85. Reset BITMAP style 
  86.    Turns off the bitmap format for the image button - it should revert back to 
  87.    being a text button. 
  88.  
  89. Set Icon picture and format. 
  90.    Sets the icon image and changes format at the same time. 
  91.  
  92. Set Bitmap picture and format. 
  93.    Sets the icon image and changes format at the same time. 
  94.  
  95.  
  96. ΓòÉΓòÉΓòÉ 4.1. Get item value ΓòÉΓòÉΓòÉ
  97.  
  98. Description      Returns the text associated with the image button (see in the 
  99.                  development environment). 
  100.  
  101. REXX Statement:  value=VpGetItemValue(window, %s) 
  102.  
  103. Parameters:      Purpose 
  104.  
  105. window           Identifies the form in which the object resides. 
  106.  
  107. itemid           The numeric ID or the symbolic name of the object. 
  108.  
  109. GETVALUE         The method identifier. 
  110.  
  111. Returns: 
  112.  
  113. value            The text of the button if it was displayed in non-image mode. 
  114.  
  115.  
  116. ΓòÉΓòÉΓòÉ 4.2. Set item value ΓòÉΓòÉΓòÉ
  117.  
  118. Description      Sets the text displayed on the image button until it is 
  119.                  changed to either bitmap or icon format. 
  120.  
  121. REXX Statement:  CALL VpSetItemValue window,itemid,value 
  122.  
  123. Parameters:      Purpose 
  124.  
  125. window           Identifies the form in which the object resides. 
  126.  
  127. itemid           The numeric ID or the symbolic name of the object. 
  128.  
  129. value            Text for the pushbutton when not in image mode 
  130.  
  131.  
  132. ΓòÉΓòÉΓòÉ 4.3. Get item picture ΓòÉΓòÉΓòÉ
  133.  
  134. Description      Returns a picture handle similar to that of VpLoadPicture for 
  135.                  use in a VisPro/REXX application. 
  136.  
  137. REXX Statement:  value=VpIButtn(window,itemid) 
  138.  
  139. Parameters:      Purpose 
  140.  
  141. window           Identifies the form in which the object resides. 
  142.  
  143. itemid           The numeric ID or the symbolic name of the object. 
  144.  
  145. Returns: 
  146.  
  147. value            A picture handle that can be used wherever a VpLoadPicture 
  148.                  value can be used. 
  149.  
  150.  
  151. ΓòÉΓòÉΓòÉ 4.4. Set item picture ΓòÉΓòÉΓòÉ
  152.  
  153. Description      Sets the image for the button from an image loaded using 
  154.                  VpLoadPicture. Please note that it is recommended that any 
  155.                  images you know will be used in your application should be 
  156.                  declared in the RESOURCE.VPR file. 
  157.  
  158. REXX Statement:  Call VpIButtn window, %s, 'SETPICTURE', value 
  159.  
  160. Parameters:      Purpose 
  161.  
  162. window           Identifies the form in which the object resides. 
  163.  
  164. itemid           The numeric ID or the symbolic name of the object. 
  165.  
  166. SETPICTURE       The method identifier. 
  167.  
  168.  value           A handle obtained using VpLoadPicture. 
  169.  
  170.  
  171. ΓòÉΓòÉΓòÉ 4.5. Set ICON style ΓòÉΓòÉΓòÉ
  172.  
  173. Description      Tells the image button to display itself as an ICON. An image 
  174.                  must already have been set using Set item picture. 
  175.  
  176. REXX Statement:  CALL VpIButtn window, itemid, "SETICON" 
  177.  
  178. Parameters:      Purpose 
  179.  
  180. window           Identifies the form in which the object resides. 
  181.  
  182. itemid           The numeric ID or the symbolic name of the object. 
  183.  
  184. SETICON          The method identifier. 
  185.  
  186.  
  187. ΓòÉΓòÉΓòÉ 4.6. Reset ICON style ΓòÉΓòÉΓòÉ
  188.  
  189. Description      Turns off the icon format for the image button - it should 
  190.                  revert back to being a text button. 
  191.  
  192. REXX Statement:  CALL VpIButtn window, itemid, "RESETICON" 
  193.  
  194. Parameters:      Purpose 
  195.  
  196. window           Identifies the form in which the object resides. 
  197.  
  198. itemid           The numeric ID or the symbolic name of the object. 
  199.  
  200. RESETICON        The method identifier. 
  201.  
  202.  
  203. ΓòÉΓòÉΓòÉ 4.7. Set BITMAP style ΓòÉΓòÉΓòÉ
  204.  
  205. Description      Tells the image button to display itself as a BITMAP. An image 
  206.                  must already have been set using Set item picture. 
  207.  
  208. REXX Statement:  CALL VpIButtn window, itemid, "SETBITMAP" 
  209.  
  210. Parameters:      Purpose 
  211.  
  212. window           Identifies the form in which the object resides. 
  213.  
  214. itemid           The numeric ID or the symbolic name of the object. 
  215.  
  216. SETBITMAP        The method identifier. 
  217.  
  218.  
  219. ΓòÉΓòÉΓòÉ 4.8. Reset BITMAP style ΓòÉΓòÉΓòÉ
  220.  
  221. Description      Turns off the bitmap format for the image button - it should 
  222.                  revert back to being a text button. 
  223.  
  224. REXX Statement:  CALL VpIButtn window, itemid, "RESETBITMAP" 
  225.  
  226. Parameters:      Purpose 
  227.  
  228. window           Identifies the form in which the object resides. 
  229.  
  230. itemid           The numeric ID or the symbolic name of the object. 
  231.  
  232. RESETBITMAP      The method identifier. 
  233.  
  234.  
  235. ΓòÉΓòÉΓòÉ 4.9. Set Icon format and picture ΓòÉΓòÉΓòÉ
  236.  
  237. Description      Sets the icon image and changes format at the same time. 
  238.  
  239. REXX Statement:  CALL VpIButtn window, itemid, "SETICONPICANDSTYLE", value 
  240.  
  241. Parameters:      Purpose 
  242.  
  243. window           Identifies the form in which the object resides. 
  244.  
  245. itemid           The numeric ID or the symbolic name of the object. 
  246.  
  247. SETICONPICANDSTYLE The method identifier. 
  248.  
  249. value            A picture handle (value) loaded using VpLoadPicture 
  250.  
  251.  
  252. ΓòÉΓòÉΓòÉ 4.10. Set Bitmap format and picture ΓòÉΓòÉΓòÉ
  253.  
  254. Description      Sets the icon image and changes format at the same time. 
  255.  
  256. REXX Statement:  CALL VpIButtn window, itemid, "SETBITMAPPICANDSTYLE", value 
  257.  
  258. Parameters:      Purpose 
  259.  
  260. window           Identifies the form in which the object resides. 
  261.  
  262. itemid           The numeric ID or the symbolic name of the object. 
  263.  
  264. SETICONPICANDSTYLE The method identifier. 
  265.  
  266. value            A picture handle (value) loaded using VpLoadPicture 
  267.