home *** CD-ROM | disk | FTP | other *** search
/ Your Choice 3 / Your Choice Software Collection 3.iso / os2 / gbase / install.002 / PICTURE.HLP (.txt) < prev    next >
Encoding:
OS/2 Help File  |  1993-10-25  |  46.5 KB  |  1,660 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Picture Control Overview ΓòÉΓòÉΓòÉ
  3.  
  4. Picture Control Overview 
  5.  
  6. The Guidelines picture control is designed to provide the same functionality as 
  7. the standard PM button and bitmap/icon controls, but with the ability to 
  8. display multiple images which may be animated or used to display different 
  9. states. 
  10.  
  11. Select a topic from the following list for further information on the picture 
  12. control: 
  13.  
  14. Γûá Picture Control Implementation 
  15. Γûá Picture Control Settings 
  16. Γûá Picture Control Reference 
  17.  
  18.  
  19. ΓòÉΓòÉΓòÉ 2. Picture Control Implementation ΓòÉΓòÉΓòÉ
  20.  
  21. Implementation 
  22.  
  23. The picture control is supplied as a Guidelines extension which is loaded when 
  24. Guidelines is loaded. 
  25.  
  26. The picture control adds the Picture Control submenu to the Create menu and the 
  27. picture button bitmap to the Controls Toolbar. 
  28.  
  29. A picture control is created by selecting one of the options from the Create: 
  30. Picture Control submenu or by selecting the picture button bitmap from the 
  31. Controls Toolbar. 
  32.  
  33. The picture control settings are changed using the Picture Control Details 
  34. Dialog Box, which appears automatically when the control is created (if the 
  35. Dialog on Create option is checked on the Options menu) or when you 
  36. double-click, or press Enter on the control. 
  37.  
  38. The picture control may be created in one of the following styles: 
  39.  
  40. Γûá Picture button 
  41. Γûá Animated button 
  42. Γûá Multistate button 
  43. Γûá Toggle button 
  44. Γûá Set button 
  45. Γûá Picture panel 
  46.  
  47.  
  48. ΓòÉΓòÉΓòÉ 2.1. Picture Button ΓòÉΓòÉΓòÉ
  49.  
  50. Picture Button 
  51.  
  52. Overview A picture button is similar to a push button control, with the 
  53.         additional capability of displaying images which are animated as the 
  54.         button is depressed. 
  55.  
  56.         The button displays half of the images in its list on the downward 
  57.         movement and the other half on the upward movement. The images 
  58.         displayed on the picture button are taken from the resources allocated 
  59.         to the application. 
  60.  
  61. Toolbar Icon 
  62.  
  63. Remarks If it is desired to only display images on the control, leave the Text 
  64.         field empty in the Picture Control Details Dialog Box. or set the Text 
  65.         property to Null 
  66.  
  67. Properties Border, Elevation, Enabled, Fill, Height, ID, Index, Interval, 
  68.         LineWidth, MousePtr, NumPictures, NumStates, Owner, Parent, State, 
  69.         Text, Update, Visible, Width, XOffset, XPos, YOffset, YPos, 
  70.  
  71. Events  Click 
  72.  
  73. Methods GetDrawMode, GetImage, SetDrawMode, SetImage 
  74.  
  75. Settings The picture button settings are changed using the Picture Control 
  76.         Details Dialog Box. 
  77.  
  78. Using the Control The picture button generates the Click event when clicked on 
  79.         using the mouse, or the keyboard. 
  80.  
  81. See Also animated button, multistate button, picture panel set button, toggle 
  82.         button, 
  83.  
  84.  
  85. ΓòÉΓòÉΓòÉ 2.2. Animated Button ΓòÉΓòÉΓòÉ
  86.  
  87. Animated Button 
  88.  
  89. Overview An animated button has the same functionality as the standard Picture 
  90.         Button, except that the images assigned to it are displayed in sequence 
  91.         without the button being pressed. 
  92.  
  93. Toolbar Icon 
  94.  
  95. Remarks The images displayed on the button are animated at the interval 
  96.         specified in the Picture Delay field in the Picture Control Details 
  97.         Dialog Box or by the Interval property. If this value is set to 0, the 
  98.         button does not animate automatically, but may be animated using the 
  99.         Index property. 
  100.  
  101.         When the animated button is pressed, the button indents itself and 
  102.         continues to animate its images. 
  103.  
  104. Properties Border, Elevation, Enabled, Fill, Height, ID, Index, Interval, 
  105.         LineWidth, MousePtr, NumPictures, NumStates, Owner, Parent, State, 
  106.         Text, Update, Visible, Width, XOffset, XPos, YOffset, YPos, 
  107.  
  108. Events  Click, State 
  109.  
  110. Methods GetDrawMode, GetImage, SetDrawMode, SetImage 
  111.  
  112. Settings The animated button settings are changed using the Picture Control 
  113.         Details Dialog Box. 
  114.  
  115. Using the Control The animated button generates the Click event when clicked on 
  116.         using the mouse, or the keyboard. 
  117.  
  118.         When an image marked as a state is displayed, the animated button 
  119.         generates a State event. 
  120.  
  121. See Also multistate button, picture button, picture panel set button, toggle 
  122.         button, 
  123.  
  124.  
  125. ΓòÉΓòÉΓòÉ 2.3. Multistate Button ΓòÉΓòÉΓòÉ
  126.  
  127. Multistate Button 
  128.  
  129. Overview A multistate button behaves in a similar fashion to the standard auto 
  130.         check box and auto three-state check box, with the ability to be 
  131.         displayed in multiple states. 
  132.  
  133. Toolbar Icon 
  134.  
  135. Remarks A multistate button has as many states as are defined in the Pictures 
  136.         list box on the Picture Control Details Dialog Box. If there are two 
  137.         states defined, the behaviour is the same as the auto check box. If 
  138.         there are three states defined, the behaviour is the same as the auto 
  139.         three-state check box. 
  140.  
  141. Properties Border, Elevation, Enabled, Fill, Height, ID, Index, Interval, 
  142.         LineWidth, MousePtr, NumPictures, NumStates, Owner, Parent, State, 
  143.         Text, Update, Visible, Width, XOffset, XPos, YOffset, YPos, 
  144.  
  145. Events  Click 
  146.  
  147. Methods GetDrawMode, GetImage, SetDrawMode, SetImage 
  148.  
  149. Settings The multistate button settings are changed using the Picture Control 
  150.         Details Dialog Box. 
  151.  
  152. Using the Control The multistate button displays the image for the current 
  153.         state. When it is pressed and released, the button moves on to the next 
  154.         image marked as a state. If there are non-state images between the 
  155.         state images, the button displays them in sequence, moving half-way 
  156.         along on the way down, and the rest of the way on the way up. When the 
  157.         new state is reached, a Click event is generated. 
  158.  
  159.         When the multistate button is pressed again, it moves forward to the 
  160.         next state, or back to state 0, once the last image in the list is 
  161.         reached. 
  162.  
  163.         See the Multistate Button Example for an example of using the 
  164.         multistate button as an automatic check box. 
  165.  
  166. See Also animated button, picture button, picture panel set button, toggle 
  167.         button, 
  168.  
  169.  
  170. ΓòÉΓòÉΓòÉ 2.3.1. Multistate Button Example ΓòÉΓòÉΓòÉ
  171.  
  172. Multistate Button Example 
  173.  
  174. A multistate button may be used to implement an automatic check box, by setting 
  175. it up as follows: 
  176.  
  177. Γûá Add the resources required: 
  178.  
  179.    Check0Up This is the image for the check box in the state 0 (unchecked) up 
  180.            position (chk0up.bmp) 
  181.    Check0Down This is the image for the check box in the state 0 (unchecked) 
  182.            down position (chk0down.bmp) 
  183.    Check1Up This is the image for the check box in the state 1 (checked) up 
  184.            position (chk1up.bmp) 
  185.    Check1Down This is the image for the check box in the state 1 (checked) down 
  186.            position (chk1down.bmp) 
  187.  
  188. Γûá Create a multistate button with the following styles: 
  189.  
  190.    Γûá Text Outside Relief 
  191.    Γûá Text Alignment Right 
  192.    Γûá Border Width = 0 
  193.    Γûá Elevation = 0 
  194.  
  195. Γûá Select the following resources for the list of images: 
  196.  
  197.    Γûá Check0Up (State) 
  198.    Γûá Check0Down 
  199.    Γûá Check1Up (State) 
  200.    Γûá Check1Down 
  201.  
  202. When this button is used, it will initially be unchecked (State = 0). When it 
  203. is clicked, the image will appear to be depressed and will then be displayed as 
  204. a checked box (State = 1). When the checked box is clicked, it will appear to 
  205. be depressed and will then be redisplayed as an unchecked box (State = 0). 
  206.  
  207.  
  208. ΓòÉΓòÉΓòÉ 2.4. Toggle Button ΓòÉΓòÉΓòÉ
  209.  
  210. Toggle Button 
  211.  
  212. Overview Toggle buttons have two states, 'off' and 'on', the 'off' state 
  213.         represented by the first image in the controls image list, and the 
  214.         second by another image in the list with the state flag set. When a 
  215.         toggle button is clicked, it toggles itself between the 'on' state and 
  216.         the 'off' state. The toggle button remains pressed when it is 'on' and 
  217.         returns to the default position when its state changes to 'off'. 
  218.  
  219. Toolbar Icon 
  220.  
  221. Remarks A toggle button has as many states as are defined in the Pictures list 
  222.         box on the Picture Control Details Dialog Box. but it ignores any 
  223.         states beyond the first two. 
  224.  
  225. Properties Border, Elevation, Enabled, Fill, Height, ID, Index, Interval, 
  226.         LineWidth, MousePtr, NumPictures, NumStates, Owner, Parent, State, 
  227.         Text, Update, Visible, Width, XOffset, XPos, YOffset, YPos, 
  228.  
  229. Events  Click 
  230.  
  231. Methods GetDrawMode, GetImage, SetDrawMode, SetImage 
  232.  
  233. Settings The toggle button settings are changed using the Picture Control 
  234.         Details Dialog Box. 
  235.  
  236. Using the Control 
  237.  
  238.         When the toggle button is pressed, it moves to the down position. When 
  239.         it is released, the button remains in the down position and moves on to 
  240.         the next image marked as a state. If there are non-state images between 
  241.         the state images, the button displays them in sequence, moving half-way 
  242.         between the states while being pressed, and the rest of the way when 
  243.         released. 
  244.  
  245.         When the new state is reached, a Click event is generated. 
  246.  
  247.         When the toggle button is next pressed, it moves forward through the 
  248.         images until it reaches the end and then returns to state 0. Once back 
  249.         in state 0, the button is displayed in the up position. 
  250.  
  251. See Also animated button, multistate button, picture button, picture panel set 
  252.         button, 
  253.  
  254.  
  255. ΓòÉΓòÉΓòÉ 2.5. Set Button ΓòÉΓòÉΓòÉ
  256.  
  257. Set Button 
  258.  
  259. Overview A set button behaves in a similar fashion to the standard auto radio 
  260.         button control. Set buttons have two states: an 'off' state, 
  261.         represented by the default state, where the first image is displayed, 
  262.         and an 'on' state, represented by another image in the list with the 
  263.         state flag set. 
  264.  
  265.         When a group (or 'set') of set buttons are created, only one button in 
  266.         the group may be 'on' at any one time. A set button automatically turns 
  267.         'off' any other set button or radio button in the group when it is 
  268.         turned 'on'. 
  269.  
  270. Toolbar Icon 
  271.  
  272. Remarks A set button has as many states as are defined in the Pictures list box 
  273.         on the Picture Control Details Dialog Box, but it ignores any state 
  274.         beyond the first two. 
  275.  
  276. Properties Border, Elevation, Enabled, Fill, Height, ID, Index, Interval, 
  277.         LineWidth, MousePtr, NumPictures, NumStates, Owner, Parent, State, 
  278.         Text, Update, Visible, Width, XOffset, XPos, YOffset, YPos, 
  279.  
  280. Events  Click 
  281.  
  282. Methods GetDrawMode, GetImage, SetDrawMode, SetImage 
  283.  
  284. Settings The set button settings are changed using the Picture Control Details 
  285.         Dialog Box. 
  286.  
  287. Using the Control The set button displays the image for the current state. When 
  288.         it is pressed and released, the button moves on to the next image 
  289.         marked as a state. If there are non-state images between the state 
  290.         images, the button displays them in sequence, moving half-way along on 
  291.         the way down, and the rest of the way on the way up. 
  292.  
  293.         When the new state is reached, a Click event is generated. 
  294.  
  295.         When the set button is pressed again, it remains in state 1, but 
  296.         displays the images forward to the end of the list when it is pressed 
  297.         and then back to state 1 when it is released. 
  298.  
  299.         When a set button moves to state 1, it ensures that all other set 
  300.         buttons in the same control group are moved back to state 0. The set 
  301.         button works in conjunction with any standard radio buttons and will 
  302.         automatically uncheck them as appropriate. 
  303.  
  304.         See the Set Button Example for an example of using the multistate 
  305.         button as an automatic radio button. 
  306.  
  307. See Also animated button, multistate button, picture button, picture panel 
  308.         toggle button, 
  309.  
  310.  
  311. ΓòÉΓòÉΓòÉ 2.5.1. Set Button Example ΓòÉΓòÉΓòÉ
  312.  
  313. Set Button Example 
  314.  
  315. A set button may be used to implement an automatic radio button, by setting it 
  316. up as follows: 
  317.  
  318. Γûá Add the resources required: 
  319.  
  320.    Radio0Up This is the image for the radio button in the state 0 (off) up 
  321.            position (radio0u.bmp) 
  322.    Radio0Down This is the image for the radio button in the state 0 (off) down 
  323.            position (radio0d.bmp) 
  324.    Radio1Up This is the image for the radio button in the state 1 (on) up 
  325.            position (radio1u.bmp) 
  326.    Radio1Down This is the image for the radio button in the state 1 (on) down 
  327.            position (radio1d.bmp) 
  328.  
  329. Γûá Create a set button with the following styles: 
  330.  
  331.    Γûá Text Outside Relief 
  332.    Γûá Text Alignment Right 
  333.    Γûá Border Width = 0 
  334.    Γûá Elevation = 0 
  335.  
  336. Γûá Select the following resources for the list of images: 
  337.  
  338.    Γûá Radio0Up (State) 
  339.    Γûá Radio0Down 
  340.    Γûá Radio1Up (State) 
  341.    Γûá Radio1Down 
  342.  
  343. When this button is used, it will initially be 'off' (State = 0). When it is 
  344. clicked, the image will appear to be depressed and will then be displayed as an 
  345. 'on' radio button (State = 1). When the radio button is clicked, it will appear 
  346. to be depressed and will then be redisplayed as an 'on' radio button (State = 
  347. 0). 
  348.  
  349. When the set button is turned 'on', any other set or radio buttons in the same 
  350. group will be turned 'off'. Similarly, when any other set or radio button in 
  351. the same group is turned 'on', this set button will be turned 'off'. 
  352.  
  353.  
  354. ΓòÉΓòÉΓòÉ 2.6. Picture Panel ΓòÉΓòÉΓòÉ
  355.  
  356. Picture Panel 
  357.  
  358. Overview A picture panel simply displays text or a set of images. This panel 
  359.         has no events for interaction with the user, but will generate the 
  360.         Change and State events as appropriate. 
  361.  
  362. Toolbar Icon 
  363.  
  364. Remarks The images displayed on the panel are animated at the interval 
  365.         specified in the Picture Delay field in the Picture Control Details 
  366.         Dialog Box or by the Interval property. If this value is set to 0, the 
  367.         panel does not animate automatically, but may be animated using the 
  368.         Index property. 
  369.  
  370. Properties Border, Elevation, Enabled, Fill, Height, ID, Index, Interval, 
  371.         LineWidth, MousePtr, NumPictures, NumStates, Owner, Parent, State, 
  372.         Text, Update, Visible, Width, XOffset, XPos, YOffset, YPos, 
  373.  
  374. Events  Change, State 
  375.  
  376. Methods GetDrawMode, GetImage, SetDrawMode, SetImage 
  377.  
  378. Settings The picture panel settings are changed using the Picture Control 
  379.         Details Dialog Box. 
  380.  
  381. Using the Control The picture generates the Change event whenever the panel 
  382.         image changes, and a State event whenever the displayed image 
  383.         represents a state. 
  384.  
  385.         The Index property may be used to change the displayed image, if it is 
  386.         not desired to use the picture control's own internal timer. 
  387.  
  388. See Also animated button, multistate button, picture button, set button, toggle 
  389.         button, 
  390.  
  391.  
  392. ΓòÉΓòÉΓòÉ 2.7. Create: Picture Control Submenu ΓòÉΓòÉΓòÉ
  393.  
  394. Create: Picture Control Sub-menu 
  395.  
  396. This submenu displays the list of picture control types which may be created 
  397. using Guidelines. 
  398.  
  399. The following types are available: 
  400.  
  401. Γûá Picture button 
  402. Γûá Animated button 
  403. Γûá Multistate button 
  404. Γûá Toggle button 
  405. Γûá Set button 
  406. Γûá Picture panel 
  407.  
  408.  
  409. ΓòÉΓòÉΓòÉ 2.7.1. Create: Picture Control: Picture Button ΓòÉΓòÉΓòÉ
  410.  
  411. Create: Picture Control: Picture Button 
  412.  
  413. Selecting this menu option allows you to create a picture button. 
  414.  
  415.  
  416. ΓòÉΓòÉΓòÉ 2.7.2. Create: Picture Control: Animated Button ΓòÉΓòÉΓòÉ
  417.  
  418. Create: Picture Control: Animated Button 
  419.  
  420. Selecting this menu option allows you to create an animated button 
  421.  
  422.  
  423. ΓòÉΓòÉΓòÉ 2.7.3. Create: Picture Control: Multistate Button ΓòÉΓòÉΓòÉ
  424.  
  425. Create: Picture Control: Multistate Button 
  426.  
  427. Selecting this menu option allows you to create a multistate button 
  428.  
  429.  
  430. ΓòÉΓòÉΓòÉ 2.7.4. Create: Picture Control: Toggle Button ΓòÉΓòÉΓòÉ
  431.  
  432. Create: Picture Control: Toggle Button 
  433.  
  434. Selecting this menu option allows you to create a toggle button 
  435.  
  436.  
  437. ΓòÉΓòÉΓòÉ 2.7.5. Create: Picture Control: Set Button ΓòÉΓòÉΓòÉ
  438.  
  439. Create: Picture Control: Set Button 
  440.  
  441. Selecting this menu option allows you to create a set button 
  442.  
  443.  
  444. ΓòÉΓòÉΓòÉ 2.7.6. Create: Picture Control: Picture Panel ΓòÉΓòÉΓòÉ
  445.  
  446. Create: Picture Control: Picture Panel 
  447.  
  448. Selecting this menu option allows you to create a picture panel 
  449.  
  450.  
  451. ΓòÉΓòÉΓòÉ 3. Picture Control Settings ΓòÉΓòÉΓòÉ
  452.  
  453. Picture Control Settings 
  454.  
  455. The Picture Control Details Dialog Box is used to change the settings for the 
  456. picture control. 
  457.  
  458. This dialog box contains a number of fields which allow the default settings 
  459. for the picture control to be specified. 
  460.  
  461. Name    Use the Name field to enter the name by which this control is to be 
  462.         known within Guidelines. 
  463.  
  464.         When Guidelines creates the control, its gives it a unique default 
  465.         name. This name may be left as is, or changed to something more 
  466.         meaningful. 
  467.  
  468. Text    Use the Text field to enter the text to be displayed on this control. 
  469.  
  470. Help Panel Name Using the Help Panel Name drop down combo box, select the help 
  471.         panel to be displayed when F1 is pressed while this control has the 
  472.         focus. 
  473.  
  474. Panel Selection Use the Pictures, Styles and Relief push buttons to select one 
  475.         of the three information panels available for changing picture control 
  476.         settings. 
  477.  
  478. In addition, this dialog contains the following pushbuttons: 
  479.  
  480.         This button displays the Presentation Parameters Dialog Box which 
  481.         specifies the colors and fonts to be used by the picture control. The 
  482.         presentation parameters used by the picture control are listed under 
  483.         the Presentation Parameters heading. 
  484.  
  485.         This button loads the Action Editor which is used to write code for the 
  486.         events supplied by the picture control. 
  487.  
  488.         This button erases the current picture control and returns to the 
  489.         Guidelines edit screen. It has the same effect as selecting the picture 
  490.         control and pressing the [Del] key. 
  491.  
  492.         This button accepts any changes you have made to the picture control 
  493.         and dismisses the dialog. 
  494.  
  495.         This button discards any changes you have made to the picture control 
  496.         and dismisses the dialog. 
  497.  
  498.         This button displays this help panel. 
  499.  
  500.  
  501. ΓòÉΓòÉΓòÉ 3.1. Styles Panel ΓòÉΓòÉΓòÉ
  502.  
  503. Styles Panel 
  504.  
  505. The Styles panel is used to specify various style flags for the picture control 
  506. and is displayed by default if the Picture Control Details Dialog Box is 
  507. displayed when the picture control is created. 
  508.  
  509. Use the Picture Type group to specify the type of picture control to create and 
  510. the Message Type group to specify the type of message the control should send 
  511. when it is clicked. 
  512.  
  513. Use the Styles group to change the basic styles of the picture control and the 
  514. Text Alignment group to specify the alignment of text displayed on the control. 
  515.  
  516.  
  517. ΓòÉΓòÉΓòÉ 3.1.1. Picture Type ΓòÉΓòÉΓòÉ
  518.  
  519. Picture Type 
  520.  
  521. Select one of the options in this group to specify the type of picture this 
  522. control should be: 
  523.  
  524. Picture Button  Selecting this option changes the picture type to picture 
  525.         button. 
  526.  
  527. Animated Button  Selecting this option changes the picture type to animated 
  528.         button. 
  529.  
  530. Multistate Button  Selecting this option changes the picture type to multistate 
  531.         button. 
  532.  
  533. Toggle Button  Selecting this option changes the picture type to toggle button. 
  534.  
  535. Set Button  Selecting this option changes the picture type to set button. 
  536.  
  537. Picture Panel  Selecting this option changes the picture type to picture panel. 
  538.  
  539.  
  540. ΓòÉΓòÉΓòÉ 3.1.2. Styles ΓòÉΓòÉΓòÉ
  541.  
  542. Styles 
  543.  
  544. Use the Styles group to select the default style to be applied to the picture 
  545. control when it is created. The following styles are available: 
  546.  
  547. Default  Select this style to have this button be selected automatically when 
  548.         the user of your application presses the Enter 
  549.  
  550. No Focus  Select this style to prevent this control from getting the input 
  551.         focus when it is selected using the mouse. Focus may be moved to this 
  552.         control by using the keyboard. 
  553.  
  554. Text Outside Relief  Select this style to display text on the outside of the 
  555.         elevated portion of the picture control. If text is aligned in the 
  556.         center of the control, this option will make no noticeable difference. 
  557.  
  558. Visible  Select this style to make the picture control visible when it is 
  559.         created. If desired, this style may be turned off and the Visible 
  560.         property may be used to make the control visible at runtime. 
  561.  
  562. Disabled  Select this style to disable the picture control when it is created. 
  563.         This style may be turned on and off using the Enabled property at 
  564.         runtime. 
  565.  
  566. Tabstop  Select this style to make the picture control a tabstop. 
  567.  
  568. Start of Group Select this style to make the picture control the start of a 
  569.         group. 
  570.  
  571.  
  572. ΓòÉΓòÉΓòÉ 3.1.3. Message Type ΓòÉΓòÉΓòÉ
  573.  
  574. Message Type 
  575.  
  576. Select one of the following values to specify the message type generated by 
  577. this control. 
  578.  
  579. Normal  A normal notification message is sent to the owner window when it has a 
  580.         command to report or when a keystroke has been translated by an 
  581.         accelerator table into a notification message. 
  582.  
  583. System Command  A system command notification message is sent to the owner 
  584.         window when it has a command to report or when a keystroke has been 
  585.         translated by an accelerator table into a notification message. 
  586.  
  587. Help Request  A help notification message is sent to the owner window when it 
  588.         has a command to report or when a keystroke has been translated by an 
  589.         accelerator table into a notification message. A help message is 
  590.         identical to a normal notification message but it implies that the 
  591.         application should respond by displaying help information. 
  592.  
  593.  
  594. ΓòÉΓòÉΓòÉ 3.1.4. Text Alignment ΓòÉΓòÉΓòÉ
  595.  
  596. Text Alignment 
  597.  
  598. Specify the horizontal alignment of text displayed in the picture control, by 
  599. selecting one of the following: 
  600.  
  601. Left    The control text is aligned to the left. 
  602.  
  603. Center  The control text is center aligned. 
  604.  
  605. Right   The control text is aligned to the right. 
  606.  Specify the vertical alignment of text displayed in the picture control, by 
  607. selecting one of the following: 
  608.  
  609. Top     The control text is aligned at the top of the control. 
  610.  
  611. Middle  The control text is aligned in the middle of the control. 
  612.  
  613. Bottom  The control text is aligned at the bottom of the control. 
  614.  
  615.  
  616. ΓòÉΓòÉΓòÉ 3.2. Pictures Panel ΓòÉΓòÉΓòÉ
  617.  
  618. Pictures Panel 
  619.  
  620. This panel is used to change the images displayed on the picture control. This 
  621. is the default panel displayed once the picture control has been created for 
  622. the first time.  Images to be displayed on the picture control are displayed in 
  623. the Pictures list box on this panel. The list box displays the following 
  624. information about the image: 
  625.  
  626. Γûá Whether the image represents a state (indicated by a 'ΓêÖ') 
  627. Γûá The display options. This will be blank if the image is to be drawn normally, 
  628.   'T' if the image is to be drawn tiled, and 'S' if the image is to be 
  629.   stretched to fit the control. 
  630. Γûá The image to be displayed. This image will be drawn using the Invert and/or 
  631.   Halftone style specified in the Options group. 
  632. Γûá The name of the image. This is the name used to reference this resource in 
  633.   Guidelines. 
  634.  
  635. Select an entry in the list box and use one of the movement push buttons to 
  636. change its position in the list, or select the Add, Insert and Remove push 
  637. buttons to change the list contents. 
  638.  
  639. If desired, this list box may be left empty, and pictures may be added to the 
  640. list at runtime using the SetImage method. 
  641.  
  642. Use the Position and Options groups to change the way each image is displayed 
  643. on the picture control. 
  644.  
  645. Use First Picture and Picture Delay to change additional picture settings. 
  646.  
  647.  
  648. ΓòÉΓòÉΓòÉ 3.2.1. Movement push buttons ΓòÉΓòÉΓòÉ
  649.  
  650. Movement push buttons 
  651.  
  652. The movement push buttons are used to change the order of the images in the 
  653. list and behave as follows: 
  654.  
  655.         Moves the selected image up one in the list. 
  656.  
  657.         Moves the selected image to the top of the list. 
  658.  
  659.         Moves the selected image to the bottom of the list. 
  660.  
  661.         Moves the selected image down one in the list. 
  662.  
  663.  
  664. ΓòÉΓòÉΓòÉ 3.2.2. Add ΓòÉΓòÉΓòÉ
  665.  
  666. Add 
  667.  
  668. Selecting the Add push button displays the Select Pictures Dialog Box which 
  669. allows you to select one or more images to be added at the end of the list of 
  670. images. 
  671.  
  672.  
  673. ΓòÉΓòÉΓòÉ 3.2.3. Insert ΓòÉΓòÉΓòÉ
  674.  
  675. Insert 
  676.  
  677. Selecting the Insert push button displays the Select Pictures Dialog Box which 
  678. allows you to select one or more images to be inserted after the currently 
  679. selected image. 
  680.  
  681.  
  682. ΓòÉΓòÉΓòÉ 3.2.4. Remove ΓòÉΓòÉΓòÉ
  683.  
  684. Remove 
  685.  
  686. The Remove push button is used to remove the currently selected image from the 
  687. list of displayed images. This image is not removed from the list of resources 
  688. available to the application and is available for selection again when the Add 
  689. or Insert push buttons are selected. 
  690.  
  691.  
  692. ΓòÉΓòÉΓòÉ 3.2.5. First Picture ΓòÉΓòÉΓòÉ
  693.  
  694. First Picture 
  695.  
  696. Use the First Picture group to select the behaviour of the first picture in the 
  697. list of images. The following options are available: 
  698.  
  699. Normal  If this option is selected, the first image behaves in the same manner 
  700.         as any other image in the picture control. 
  701.  
  702. Disabled  If this option is selected, the first image is displayed only when 
  703.         the picture control is disabled. This allows a separate image to be 
  704.         specified as a disabled image. When the picture control is enabled, 
  705.         this image is never displayed and the second image in the list becomes 
  706.         the default image. 
  707.  
  708.  
  709. ΓòÉΓòÉΓòÉ 3.2.6. Picture Delay ΓòÉΓòÉΓòÉ
  710.  
  711. Picture Delay 
  712.  
  713. Set the Picture Delay spin button to a nonzero value if it is desired to have a 
  714. delay between images when animation occurs. Animation may occur under the 
  715. following circumstances: 
  716.  
  717. Γûá When the picture control acts as a panel or an animated button and it is 
  718.   desired to regularly change the displayed image. 
  719. Γûá When the picture control is a set, toggle, multistate or picture button and 
  720.   it moves between states. 
  721.  In each case, the delay is applied between each image displayed on the 
  722. control.  If this field is set to 0, no animation will occur on a picture panel 
  723. or animated button and there will be no delay between images on set, toggle, 
  724. multistate and picture buttons. 
  725.  
  726.  
  727. ΓòÉΓòÉΓòÉ 3.2.7. Position ΓòÉΓòÉΓòÉ
  728.  
  729. Position 
  730.  
  731. The Position group specifies the position of the currently selected image in 
  732. the picture control. 
  733.  
  734. Choose one of the following to specify the horizontal position of the image: 
  735.  
  736. Left    The image will be positioned at the left of the control. 
  737.  
  738. Center  The image will be positioned at the center of the control. 
  739.  
  740. Right   The image will be positioned at the right of the control. 
  741.  Choose one of the following to specify the vertical position of the image: 
  742.  
  743. Top     The image will be positioned at the top of the control. 
  744.  
  745. Middle  The image will be positioned in the middle of the control. 
  746.  
  747. Bottom  The image will be positioned at the bottom of the control. 
  748.  
  749.  
  750. ΓòÉΓòÉΓòÉ 3.2.8. Options ΓòÉΓòÉΓòÉ
  751.  
  752. Options 
  753.  
  754. The Options group specifies drawing options for the currently selected image in 
  755. the picture control. 
  756.  
  757. Choose one of the following to specify the drawing style of the image: 
  758.  
  759. Invert  The image will be drawn inverted on the control. 
  760.  
  761. Halftone  The image will be drawn halftoned on the control. 
  762.  
  763. Select the State check box if this image represents a state on a set, toggle or 
  764. multistate button. 
  765.  
  766. Choose one of the following to specify the arrangement of the image on the 
  767. control: 
  768.  
  769. Normal  The image will be displayed at its normal size and will not be tiled. 
  770.  
  771. Tile    The image will be tiled to cover the control. 
  772.  
  773. Stretch The image will be stretched to cover the control. 
  774.  
  775.  
  776. ΓòÉΓòÉΓòÉ 3.3. Relief Panel ΓòÉΓòÉΓòÉ
  777.  
  778. Relief Panel 
  779.  
  780. The Relief panel is used to specify the style of the elevated portion of the 
  781. picture control.  Use this panel to specify the Relief Border Style, the Border 
  782. Width and relief Elevation.  Use the Relief Fill Style value set to select a 
  783. fill style for the relief and the Size Control group to specify how the control 
  784. dynamically adjusts its size. 
  785.  
  786.  
  787. ΓòÉΓòÉΓòÉ 3.3.1. Relief Border Style ΓòÉΓòÉΓòÉ
  788.  
  789. Relief Border Style 
  790.  
  791. Select a border style from the styles displayed. These styles represent the 
  792. line type used to draw the border surrounding the elevated part of the button. 
  793. The width of this border is determined by the Border Width spin button. 
  794.  
  795.  
  796. ΓòÉΓòÉΓòÉ 3.3.2. Border Width ΓòÉΓòÉΓòÉ
  797.  
  798. Border Width 
  799.  
  800. Use this spin button to select the width of the border to be displayed. If the 
  801. border width is 0, no border will be drawn. The border is drawn in the style 
  802. specified by the Relief Border Style field. 
  803.  
  804.  
  805. ΓòÉΓòÉΓòÉ 3.3.3. Elevation ΓòÉΓòÉΓòÉ
  806.  
  807. Elevation 
  808.  
  809. Use this spin button to select the elevation of the relief. Specifying a 
  810. negative value will result in the picture control appearing as an indent into 
  811. its parent window, greater than zero will result in an outdent. The surface of 
  812. the relief is filled with the pattern specified by the Relief Fill Style. 
  813.  
  814.  
  815. ΓòÉΓòÉΓòÉ 3.3.4. Relief Fill Style ΓòÉΓòÉΓòÉ
  816.  
  817. Relief Fill Style 
  818.  
  819. Select a fill style from the styles displayed. These types represent the fill 
  820. pattern used to fill the top of the relief. The fill pattern is displayed 
  821. behind the images and text which are also displayed on the relief. If the first 
  822. fill style is selected, there is no apparent pattern displayed in the relief, 
  823. except for the pattern caused by the dithering carried out by PM to represent 
  824. RGB colors. 
  825.  
  826.  
  827. ΓòÉΓòÉΓòÉ 3.3.5. Size Control ΓòÉΓòÉΓòÉ
  828.  
  829. Size Control 
  830.  
  831. In this group, select one of the following to specify how the picture control 
  832. adjusts its size at runtime: 
  833.  
  834. Retain Normal Size  If this option is selected, the picture control does 
  835.         nothing to change its size at runtime. 
  836.  
  837. Size To Parent  If this option is selected, the picture control sizes itself to 
  838.         fit inside its parent window, when the parent window size changes. 
  839.  
  840. Scale to Picture  If this option is selected, the picture control sizes itself 
  841.         to the size of its first picture when it is created. 
  842.  
  843.  
  844. ΓòÉΓòÉΓòÉ 3.4. Picture Selection ΓòÉΓòÉΓòÉ
  845.  
  846. Picture Selection 
  847.  
  848. The Select Pictures Dialog Box allows you to select one or more images to be 
  849. added at the end of the list of images. 
  850.  
  851. This dialog box contains a list box from which resources may be selected. 
  852.  
  853. Select one or more resources in the list box and press the Add or Insert push 
  854. button to have these resources placed in the list of images for the control. 
  855.  
  856. Selecting Cancel. closes this dialog box without adding any of the resources to 
  857. the list. 
  858.  
  859. Selecting Help displays this help panel. 
  860.  
  861.  
  862. ΓòÉΓòÉΓòÉ 4. Picture Control Reference ΓòÉΓòÉΓòÉ
  863.  
  864. Picture Control Reference 
  865.  
  866. This section provides a programming reference to the picture control. 
  867.  
  868. It contains the following sections: 
  869.  
  870. Γûá Properties 
  871. Γûá Methods 
  872. Γûá Events 
  873. Γûá Constants 
  874. Γûá Presentation Parameters 
  875.  
  876.  
  877. ΓòÉΓòÉΓòÉ 4.1. Properties ΓòÉΓòÉΓòÉ
  878.  
  879. Properties 
  880.  
  881. The following properties are supported by the picture control: 
  882.  
  883. Border  Specifies the border style of the picture control 
  884.  
  885. Elevation  Specifies the elevation of the picture control 
  886.  
  887. Enabled  Specifies whether the picture control is currently enabled 
  888.  
  889. Fill    Specifies the fill pattern of the picture control background 
  890.  
  891. Height  Specifies the height of the picture control 
  892.  
  893. ID      Specifies the ID of the picture control 
  894.  
  895. Index   Specifies the current image index for the picture control 
  896.  
  897. Interval  Specifies the current timer interval for animated picture controls 
  898.  
  899. LineWidth  Specifies the width of the border line drawn around the picture 
  900.         control 
  901.  
  902. MousePtr  Specifies the pointer to be displayed over the picture control 
  903.  
  904. NumPictures  Specifies the number of pictures available for display on the 
  905.         picture control 
  906.  
  907. NumStates  Specifies the number of images marked as 'State' on the picture 
  908.         control 
  909.  
  910. Owner   Specifies the owner window of the picture control 
  911.  
  912. Parent  Specifies the parent window of the picture control 
  913.  
  914. State   Specifies the current state index for the picture control 
  915.  
  916. Text    Specifies the text displayed on the picture control 
  917.  
  918. Update  Turns updating of the picture control window on and off 
  919.  
  920. Visible  Specifies whether the picture control is visible 
  921.  
  922. Width   Specifies the width of the picture control 
  923.  
  924. XOffset  Specifies the horizontal offset to begin the display of picture 
  925.         control images. 
  926.  
  927. XPos    Specifies the horizontal position of the picture control 
  928.  
  929. YOffset  Specifies the vertical offset to begin the display of picture control 
  930.         images. 
  931.  
  932. YPos    Specifies the vertical position of the picture control 
  933.  
  934.  
  935. ΓòÉΓòÉΓòÉ 4.2. Events ΓòÉΓòÉΓòÉ
  936.  
  937. Events 
  938.  
  939. The following events are supported by the picture control: 
  940.  
  941. Change  The image displayed on the picture control has changed 
  942.  
  943. Click   The picture control has been clicked using the mouse or keyboard 
  944.  
  945. State   The picture control state has changed 
  946.  
  947.  
  948. ΓòÉΓòÉΓòÉ 4.3. Methods ΓòÉΓòÉΓòÉ
  949.  
  950. Methods 
  951.  
  952. The following methods are supported by the picture control: 
  953.  
  954. GetDrawMode  Get the drawing mode for an image displayed on the picture control 
  955.  
  956. GetImage  Get an image displayed on the picture control 
  957.  
  958. SetDrawMode  Set the drawing mode for an image displayed on the picture control 
  959.  
  960. SetImage  Set an image to be displayed on the picture control 
  961.  
  962.  
  963. ΓòÉΓòÉΓòÉ 4.4. Constants ΓòÉΓòÉΓòÉ
  964.  
  965. Constants 
  966.  
  967. The following constants are supplied by the picture control: 
  968.  
  969. PcsBottom  The image will be aligned at the bottom of the control. 
  970.  
  971. PcsCenter  The image will be centered. 
  972.  
  973. PcsHalfTone  The image is being drawn half-toned. 
  974.  
  975. PcsInvert  The image is being drawn inverted. 
  976.  
  977. PcsLeft  The image will be left aligned. 
  978.  
  979. PcsMiddle  The image will be aligned in the middle of the control. 
  980.  
  981. PcsNormal  The image will be drawn at its normal size. It will be cropped as 
  982.         appropriate by the picture control. 
  983.  
  984. PcsRight  The image will be right aligned. 
  985.  
  986. PcsState  The image represents a state. 
  987.  
  988. PcsStretch  The image will be stretched or shrunk to fill the picture control. 
  989.  
  990. PcsTiled  The image will be tiled to fill the picture control. 
  991.  
  992. PcsTop  The image will be aligned at the top of the control. 
  993.  
  994.  
  995. ΓòÉΓòÉΓòÉ 4.5. Presentation Parameters ΓòÉΓòÉΓòÉ
  996.  
  997. Presentation Parameters 
  998.  
  999. The following presentation parameters are used by the picture control: 
  1000.  
  1001. PP_Background  Specifies the color of the relief background 
  1002.  
  1003. PP_Border  Specifies the color of the border drawn around the control 
  1004.  
  1005. PP_DisabledBackground  Specifies the color of the shaded edge of the relief 
  1006.  
  1007. PP_Foreground  Specifies the color of the fill pattern and the text displayed 
  1008.         on the control 
  1009.  
  1010. PP_HiliteBackground  Specifies the color of the nonshaded edge of the relief 
  1011.  
  1012.  
  1013. ΓòÉΓòÉΓòÉ 4.6. Border Property ΓòÉΓòÉΓòÉ
  1014.  
  1015. Border Property 
  1016.  
  1017. This property specifies the border line style for the picture control. 
  1018.  
  1019. Syntax  SHORT <Window>.Border 
  1020.  
  1021. Remarks A border line is drawn around the picture control at the width 
  1022.         specified by the LineWidth property. 
  1023.  
  1024.         The border line type may take one of the following values: 
  1025.  
  1026.    Line_Dot 
  1027.    Line_ShortDash 
  1028.    Line_DashDot 
  1029.    Line_DoubleDot 
  1030.    Line_LongDash 
  1031.    Line_DashDoubleDot 
  1032.    Line_Solid 
  1033.    Line_Invisible (not drawn) 
  1034.  
  1035. Example This example sets the border line style to Line_Solid and the width to 
  1036.         5 pixels: 
  1037.  
  1038.                 Frame1.Picture1.Border = Line_ShortDash
  1039.                 Frame1.Picture1.LineWidth = 5
  1040.  
  1041. See Also  Elevation, Fill, LineWidth 
  1042.  
  1043.  
  1044. ΓòÉΓòÉΓòÉ 4.7. Change Event ΓòÉΓòÉΓòÉ
  1045.  
  1046. Change Event 
  1047.  
  1048. This event occurs when a new image is displayed on the picture control. 
  1049.  
  1050. Prototype 
  1051.  
  1052.                 VOID <Window>.Change ()
  1053.  
  1054.                 end
  1055.  
  1056. Parameters None 
  1057.  
  1058. Return Value None 
  1059.  
  1060. Remarks The image on the picture control may change automatically if it is 
  1061.         being animated, or the change may be generated if the current image is 
  1062.         changed using SetImage. 
  1063.  
  1064. Example This example uses the Change event to generate sounds: 
  1065.  
  1066.                 VOID Frame1.Picture1.Change ()
  1067.                   if Frame1.Picture1.Index = 1
  1068.                   then
  1069.                     Sound (600, 75) ; Generate a low sound for this image
  1070.                   else
  1071.                     Sound (1200, 75) ; Generate a higher sound for this image
  1072.                   endif
  1073.                 end
  1074.  
  1075. See Also Click, State 
  1076.  
  1077.  
  1078. ΓòÉΓòÉΓòÉ 4.8. Click Event ΓòÉΓòÉΓòÉ
  1079.  
  1080. Click Event 
  1081.  
  1082. This event occurs when the picture control has been pressed using the mouse or 
  1083. keyboard 
  1084.  
  1085. Prototype 
  1086.  
  1087.                 VOID <Window>.Click ()
  1088.  
  1089.                 end
  1090.  
  1091. Parameters None 
  1092.  
  1093. Return Value None 
  1094.  
  1095. Remarks This event is not generated when the picture control is acting as a 
  1096.         picture panel. 
  1097.  
  1098.         A user presses a set, toggle, multistate, animated or picture button to 
  1099.         generate a Click event in the following ways: 
  1100.  
  1101.    Γûá By clicking the control with the left mouse button 
  1102.    Γûá By pressing the spacebar when a button has the input focus 
  1103.    Γûá By pressing the Enter 
  1104.  
  1105. Example This example invokes a dialog box when a picture button is pressed: 
  1106.  
  1107.                 VOID Frame1.AddUser.Click
  1108.                   DlgAddUser.Invoke (Frame1)
  1109.                 end
  1110.  
  1111. See Also Change, State 
  1112.  
  1113.  
  1114. ΓòÉΓòÉΓòÉ 4.9. Elevation Property ΓòÉΓòÉΓòÉ
  1115.  
  1116. Elevation Property 
  1117.  
  1118. This property specifies the elevation of the relief portion of the picture 
  1119. control. 
  1120.  
  1121. Syntax 
  1122.  
  1123.                 SHORT <Window>.Elevation
  1124.  
  1125. Remarks The elevation of the picture control may be less than 0 to specify an 
  1126.         indent or greater than 0 to specify an outdent.  When a picture control 
  1127.         defined as one of the button types is pressed, the elevation is made 
  1128.         the negative of the default elevation to give the 'pushed' appearance. 
  1129.  
  1130. Example This example sets the elevation of the picture control to be a quarter 
  1131.         of its width: 
  1132.  
  1133.                 Frame1.Picture1.Elevation = Frame1.Picture1.Width / 4
  1134.  
  1135. See Also Border, Fill, LineWidth 
  1136.  
  1137.  
  1138. ΓòÉΓòÉΓòÉ 4.10. Fill Property ΓòÉΓòÉΓòÉ
  1139.  
  1140. Fill Property 
  1141.  
  1142. This property specifies the fill pattern for the elevated relief background. 
  1143.  
  1144. Syntax 
  1145.  
  1146.                 SHORT <Window>.Fill
  1147.  
  1148. Remarks The fill pattern may take one of the following values: 
  1149.  
  1150.    Fill_Density1 
  1151.    Fill_Density2 
  1152.    Fill_Density3 
  1153.    Fill_Density4 
  1154.    Fill_Density5 
  1155.    Fill_Density6 
  1156.    Fill_Density7 
  1157.    Fill_Density8 
  1158.    Fill_Vertical 
  1159.    Fill_Horizontal 
  1160.    Fill_Diagonal1 
  1161.    Fill_Diagonal2 
  1162.    Fill_Diagonal3 
  1163.    Fill_Diagonal4 
  1164.    Fill_NoShade 
  1165.    Fill_Solid 
  1166.    Fill_HalfTone 
  1167.    Fill_Hatch 
  1168.    Fill_DiagonalHatch 
  1169.  
  1170. Example This example sets the fill pattern to Fill_HalfTone: 
  1171.  
  1172.                 Frame1.Picture1.Fill = Fill_HalfTone
  1173.  
  1174. See Also Border, Elevation, LineWidth 
  1175.  
  1176.  
  1177. ΓòÉΓòÉΓòÉ 4.11. GetDrawMode Method ΓòÉΓòÉΓòÉ
  1178.  
  1179. GetDrawMode Method 
  1180.  
  1181. This method gets the current drawing mode of an image in the picture control. 
  1182.  
  1183. Syntax 
  1184.  
  1185.                 SHORT <Window>.GetDrawMode (SHORT PicIndex)
  1186.  
  1187. Parameters 
  1188.  
  1189.    PicIndex  This is the index of the image to get the drawing mode of. This 
  1190.            value must be greater than or equal to 0 and less than the current 
  1191.            value of the NumPictures property. 
  1192.  
  1193. Return Value This method returns a value made up of the following groups of 
  1194.         flags: 
  1195.  
  1196.    Drawing Flags  This may be a combination of the following flags. If neither 
  1197.            of these flags is specified, the image is being drawn normally. 
  1198.  
  1199.       Γûá PcsHalfTone 
  1200.       Γûá PcsInvert 
  1201.  
  1202.    Sizing Flags  One of the following flags will be used to specify whether the 
  1203.            image is drawn at its normal size, or whether it is stretched or 
  1204.            tiled to fit the control: 
  1205.  
  1206.       Γûá PcsNormal 
  1207.       Γûá PcsStretch 
  1208.       Γûá PcsTiled 
  1209.  
  1210.    Horizontal Alignment  One of the following flags will be set to indicate the 
  1211.            horizontal alignment of the image within the picture control: 
  1212.  
  1213.       Γûá PcsLeft 
  1214.       Γûá PcsCenter 
  1215.       Γûá PcsRight 
  1216.  
  1217.    Vertical Alignment  One of the following flags will be set to indicate the 
  1218.            vertical alignment of the image within the picture control: 
  1219.  
  1220.       Γûá PcsTop 
  1221.       Γûá PcsMiddle 
  1222.       Γûá PcsBottom 
  1223.  
  1224.    State Flag  If the image represents a state, it will have the PcsState flag 
  1225.            set. 
  1226.  
  1227. Remarks Images are aligned and drawn in the portion of the picture control 
  1228.         surrounded by the elevated edges (ie, the relief). All alignment and 
  1229.         drawing are relative to this region of the control. When text is being 
  1230.         displayed outside the relief (see the Styles panel on the Picture 
  1231.         Control Details Dialog Box), the size of the relief is the same as that 
  1232.         of the image to be drawn and the alignment and sizing flags are 
  1233.         effectively ignored. 
  1234.  
  1235. Example This example gets the drawing mode of an image, sets the PcsState flag 
  1236.         and then updates the drawing mode of the image: 
  1237.  
  1238.                 SHORT DrawMode
  1239.  
  1240.                 DrawMode = Frame1.Picture1.GetDrawMode (0)
  1241.                 DrawMode = BitOr (DrawMode, PcsState)
  1242.                 Frame1.Picture1.SetDrawMode (0, DrawMode)
  1243.  
  1244. See Also GetImage, Index, SetDrawMode 
  1245.  
  1246.  
  1247. ΓòÉΓòÉΓòÉ 4.12. GetImage Method ΓòÉΓòÉΓòÉ
  1248.  
  1249. GetImage Method 
  1250.  
  1251. This method retrieves the image at the specified index on the picture control. 
  1252.  
  1253. Syntax 
  1254.  
  1255.                 IMAGE <Window>.GetImage (SHORT PicIndex)
  1256.  
  1257. Parameters 
  1258.  
  1259.    PicIndex  This is the index of the image to retrieve. This value must be 
  1260.            greater than or equal to 0 and less than the current value of the 
  1261.            NumPictures property. 
  1262.  
  1263. Return Value This method returns the image displayed at the specified index, or 
  1264.         Null if no image is being displayed at that index. 
  1265.  
  1266. Remarks This method returns the base image used on the control, not the final 
  1267.         image as it appears when it is drawn on the control. That is, the 
  1268.         drawing mode flags used to draw the image are also required if it is 
  1269.         desired to duplicate this image on another control. 
  1270.  
  1271. Example This example gets the image at index 0 on the picture control, sets its 
  1272.         drawing mode to be inverted and then adds the image at index 1 on the 
  1273.         control: 
  1274.  
  1275.                 IMAGE Image0
  1276.                 SHORT DrawMode0
  1277.  
  1278.                 ; Get the image details for index 0
  1279.                 Image0 = Frame1.Picture1.GetImage (0)
  1280.                 DrawMode0 = Frame1.Picture1.GetDrawMode (0)
  1281.  
  1282.                 ; Adjust the drawing mode
  1283.                 DrawMode0 = BitOr (DrawMode0, PcsInvert)
  1284.  
  1285.                 ; Now, set the image for index 1
  1286.                 Frame1.Picture1.SetImage (1, Image0)
  1287.                 Frame1.Picture1.SetDrawMode (1, DrawMode0)
  1288.  
  1289. See Also GetDrawMode, Index, SetImage. 
  1290.  
  1291.  
  1292. ΓòÉΓòÉΓòÉ 4.13. Index Property ΓòÉΓòÉΓòÉ
  1293.  
  1294. Index Property 
  1295.  
  1296. This property specifies the index of the currently displayed image in the 
  1297. picture control. 
  1298.  
  1299. Syntax 
  1300.  
  1301.                 SHORT <Window>.Index
  1302.  
  1303. Remarks This property may take values from 0 up to the value of the NumPictures 
  1304.         property. 
  1305.  
  1306. Example This example queries the current image index and uses it to get the 
  1307.         image displayed on the picture control: 
  1308.  
  1309.                 IMAGE CurrImage
  1310.                 SHORT CurrIndex
  1311.  
  1312.                 ; Get the index of the displayed image
  1313.                 CurrIndex = Frame1.Picture1.Index
  1314.  
  1315.                 ; Get the image from the picture control
  1316.                 CurrImage = Frame1.Picture1.GetImage (CurrIndex)
  1317.  
  1318. See Also Change, GetDrawMode, GetImage, SetDrawMode, SetImage, State. 
  1319.  
  1320.  
  1321. ΓòÉΓòÉΓòÉ 4.14. Interval Property ΓòÉΓòÉΓòÉ
  1322.  
  1323. Interval Property 
  1324.  
  1325. This property specifies the time interval between images when a picture control 
  1326. is animated. 
  1327.  
  1328. Syntax 
  1329.  
  1330.                 SHORT <Window>.Interval
  1331.  
  1332. Remarks This property is measured in milliseconds (1000 milliseconds = 1 
  1333.         second). The interval specified is used as a pause between each image 
  1334.         when animation is occurring in the picture control.  The behaviour of 
  1335.         the control when this property is set to 0 depends on the Picture Type 
  1336.         (set in the Styles panel on the Picture Control Details Dialog Box). 
  1337.         For a picture panel or an animated button, no animation occurs when 
  1338.         this property is set to 0. For set, toggle, multistate and picture 
  1339.         buttons, there is no delay between images when animation occurs. 
  1340.  
  1341. Example This example set the timer interval for a picture control to be 0.25 
  1342.         seconds (250 milliseconds): 
  1343.  
  1344.                 Frame1.Picture1.Interval = 250
  1345.  
  1346. See Also Change 
  1347.  
  1348.  
  1349. ΓòÉΓòÉΓòÉ 4.15. LineWidth Property ΓòÉΓòÉΓòÉ
  1350.  
  1351. LineWidth Property 
  1352.  
  1353. This property specifies the width of the border line drawn around the picture 
  1354. control. 
  1355.  
  1356. Syntax 
  1357.  
  1358.                 SHORT <Window>.LineWidth
  1359.  
  1360. Remarks The border line width of the picture control must be greater than or 
  1361.         equal to 0. If it is equal to zero, no border line is drawn. 
  1362.  
  1363. Example This example sets the border line width of the picture control to be a 
  1364.         quarter of the control's width: 
  1365.  
  1366.                 Frame1.Picture1.LineWidth = Frame1.Picture1.Width / 4
  1367.  
  1368. See Also Border, Elevation, Fill 
  1369.  
  1370.  
  1371. ΓòÉΓòÉΓòÉ 4.16. NumPictures Property ΓòÉΓòÉΓòÉ
  1372.  
  1373. NumPictures Property 
  1374.  
  1375. This property specifies the number of images currently loaded by the picture 
  1376. control. 
  1377.  
  1378. Syntax 
  1379.  
  1380.                 SHORT <Window>.NumPictures
  1381.  
  1382. Remarks This property is read-only. Its value is set either at design-time or 
  1383.         by adding images using SetImage. 
  1384.  
  1385. Example This example is a code module which loads a specified image file and 
  1386.         adds it to the end of the list of images for the picture control: 
  1387.  
  1388.                 VOID <Window>.Change ()
  1389.  
  1390.                 end
  1391.         VOID LoadImageFile (STRING ImageFileName)   SHORT NumPics   IMAGE 
  1392.         NewImage    NewImage = LoadImage (ImageFileName)   NumPics = 
  1393.         Frame1.Picture1.NumPictures   Frame1.Picture1.SetImage (NumPics, 
  1394.         NewImage) end 
  1395.  
  1396. See Also Index, NumStates, SetImage 
  1397.  
  1398.  
  1399. ΓòÉΓòÉΓòÉ 4.17. NumStates Property ΓòÉΓòÉΓòÉ
  1400.  
  1401. NumStates Property 
  1402.  
  1403. This property specifies the number of images marked as 'State' on the picture 
  1404. control. 
  1405.  
  1406. Syntax 
  1407.  
  1408.                 SHORT <Window>.NumStates
  1409.  
  1410. Remarks The value of this property is read-only and is determined by the number 
  1411.         of images which have their drawing mode set to 'State'. This may be 
  1412.         done at design-time or at runtime by using the SetDrawMode method. 
  1413.  
  1414. Example This example finds the number of states defined on the picture control 
  1415.         and sets the current state to the last one available: 
  1416.  
  1417.                 SHORT NumState
  1418.  
  1419.                 NumState = Frame1.Picture1.NumStates
  1420.                 Frame1.Picture1.State = NumState - 1
  1421.  
  1422. See Also Index, NumPictures, State 
  1423.  
  1424.  
  1425. ΓòÉΓòÉΓòÉ 4.18. SetDrawMode Method ΓòÉΓòÉΓòÉ
  1426.  
  1427. SetDrawMode Method 
  1428.  
  1429. This method sets the current drawing mode of an image in the picture control. 
  1430.  
  1431. Syntax 
  1432.  
  1433.                 SHORT <Window>.SetDrawMode (SHORT PicIndex, SHORT DrawMode)
  1434.  
  1435. Parameters 
  1436.  
  1437.    PicIndex  This is the index of the image to set the drawing mode of. This 
  1438.            value must be greater than or equal to 0 and less than the current 
  1439.            value of the NumPictures property. 
  1440.  
  1441.    DrawMode  This is the drawing mode for the image. It is made up of the 
  1442.            following groups of flags: 
  1443.  
  1444.            Drawing Flags. This may be a combination of the following flags. If 
  1445.            neither of these flags is specified, the image is to be drawn 
  1446.            normally. 
  1447.  
  1448.       Γûá PcsHalfTone 
  1449.       Γûá PcsInvert 
  1450.  
  1451.            Sizing Flags. Use one of the following flags to specify whether the 
  1452.            image is to be drawn at its normal size, or whether it is to be 
  1453.            stretched or tiled to fit the control: 
  1454.  
  1455.       Γûá PcsNormal 
  1456.       Γûá PcsStretch 
  1457.       Γûá PcsTiled 
  1458.  
  1459.            Horizontal Alignment. Set one of the following flags to indicate the 
  1460.            horizontal alignment of the image within the picture control: 
  1461.  
  1462.       Γûá PcsLeft 
  1463.       Γûá PcsCenter 
  1464.       Γûá PcsRight 
  1465.  
  1466.            Vertical Alignment. Set one of the following flags to indicate the 
  1467.            vertical alignment of the image within the picture control: 
  1468.  
  1469.       Γûá PcsTop 
  1470.       Γûá PcsMiddle 
  1471.       Γûá PcsBottom 
  1472.  
  1473.            State Flag If the image represents a state, set the PcsState flag. 
  1474.  
  1475. Return Value This method returns True if successful, and False otherwise. 
  1476.  
  1477. Remarks Images are aligned and drawn in the portion of the picture control 
  1478.         surrounded by the elevated edges (ie, the relief). All alignment and 
  1479.         drawing are relative to this region of the control. When text is being 
  1480.         displayed outside the relief (see the Styles panel on the Picture 
  1481.         Control Details Dialog Box), the size of the relief is the same as that 
  1482.         of the image to be drawn and the alignment and sizing flags are 
  1483.         effectively ignored. 
  1484.  
  1485. Example This example gets the drawing mode of an image, sets the PcsState flag 
  1486.         and then updates the drawing mode of the image: 
  1487.  
  1488.                 SHORT DrawMode
  1489.  
  1490.                 DrawMode = Frame1.Picture1.GetDrawMode (0)
  1491.                 DrawMode = BitOr (DrawMode, PcsState)
  1492.                 Frame1.Picture1.SetDrawMode (0, DrawMode)
  1493.  
  1494. See Also GetDrawMode, Index, NumPictures, SetImage. 
  1495.  
  1496.  
  1497. ΓòÉΓòÉΓòÉ 4.19. SetImage Method ΓòÉΓòÉΓòÉ
  1498.  
  1499. SetImage Method 
  1500.  
  1501. This method sets the image to be displayed at the specified index on the 
  1502. picture control. 
  1503.  
  1504. Syntax 
  1505.  
  1506.                 SHORT <Window>.SetImage (SHORT PicIndex, IMAGE PicImage)
  1507.  
  1508. Parameters 
  1509.  
  1510.    PicIndex  This is the index of the image to set. This value must be greater 
  1511.            than or equal to 0. If it is greater than or equal to the current 
  1512.            value of the NumPictures property, the picture control increases the 
  1513.            size of its image list appropriately to make room for the extra 
  1514.            images. Any unused image indices will be assigned a Null image and 
  1515.            default drawing mode flags. 
  1516.  
  1517.    PicImage  This is the image to display at this index, or Null to clear the 
  1518.            current image. 
  1519.  
  1520. Return Value This method returns True if successful, and False otherwise. 
  1521.  
  1522. Remarks Once an image is added to the picture control, use SetDrawMode to set 
  1523.         its drawing mode appropriately.  If the image at the current Index of 
  1524.         the control is changed, the image will be updated immediately. If the 
  1525.         drawing mode is subsequently changed, the image may appear to flicker. 
  1526.         If it is desired to insert a new image and change its drawing mode 
  1527.         immediately, set the Update property to False, update the image, and 
  1528.         then reset the Update property to True. 
  1529.  
  1530. Example This example gets the image at index 0 on the picture control, sets its 
  1531.         drawing mode to be inverted and then adds the image at index 1 on the 
  1532.         control: 
  1533.  
  1534.                 IMAGE Image0
  1535.                 SHORT DrawMode0
  1536.  
  1537.                 ; Get the image details for index 0
  1538.                 Image0 = Frame1.Picture1.GetImage (0)
  1539.                 DrawMode0 = Frame1.Picture1.GetDrawMode (0)
  1540.  
  1541.                 ; Adjust the drawing mode
  1542.                 DrawMode0 = BitOr (DrawMode0, PcsInvert)
  1543.  
  1544.                 ; Now, set the image for index 1
  1545.                 Frame1.Picture1.SetImage (1, Image0)
  1546.                 Frame1.Picture1.SetDrawMode (1, DrawMode0)
  1547.  
  1548. See Also GetImage, Index, NumPictures, SetDrawMode 
  1549.  
  1550.  
  1551. ΓòÉΓòÉΓòÉ 4.20. State Event ΓòÉΓòÉΓòÉ
  1552.  
  1553. State Event 
  1554.  
  1555. This event occurs when the new image displayed on the picture control 
  1556. represents a 'state'. 
  1557.  
  1558. Prototype 
  1559.  
  1560.                 VOID <Window>.State ()
  1561.  
  1562.                 end
  1563.  
  1564. Parameters None 
  1565.  
  1566. Return Value None 
  1567.  
  1568. Remarks The State event may be generated when a state image is displayed 
  1569.         automatically by animation, or if the state of the current image is 
  1570.         changed using SetDrawMode. 
  1571.  
  1572. Example This example uses the State event to generate sounds: 
  1573.  
  1574.                 VOID Frame1.Picture1.State ()
  1575.                   if Frame1.Picture1.State = 1
  1576.                   then
  1577.                     Sound (600, 75) ; Generate a low sound for this state
  1578.                   else
  1579.                     Sound (1200, 75) ; Generate a higher sound for this state
  1580.                   endif
  1581.                 end
  1582.  
  1583. See Also Change, Click 
  1584.  
  1585.  
  1586. ΓòÉΓòÉΓòÉ 4.21. State Property ΓòÉΓòÉΓòÉ
  1587.  
  1588. State Property 
  1589.  
  1590. This property specifies the current state index for the picture control. 
  1591.  
  1592. Syntax 
  1593.  
  1594.                 SHORT <Window>.State
  1595.  
  1596. Remarks This property may take values from 0 up to the value of the NumStates 
  1597.         property.  This property is the equivalent of the Checked property for 
  1598.         radio buttons and check boxes and is used in the same way. 
  1599.  
  1600. Example This example queries the current state of a picture control and sets a 
  1601.         configuration variable based on the returned state: 
  1602.  
  1603.                 SHORT PrinterOn
  1604.  
  1605.                 PrinterOn = Frame1.PrinterToggle.State
  1606.  
  1607. See Also Index, NumStates, SetDrawMode 
  1608.  
  1609.  
  1610. ΓòÉΓòÉΓòÉ 4.22. XOffset Property ΓòÉΓòÉΓòÉ
  1611.  
  1612. XOffset Property 
  1613.  
  1614. This property specifies the horizontal offset to begin the display of picture 
  1615. control images. 
  1616.  
  1617. Syntax 
  1618.  
  1619.                 SHORT <Window>.XOffset
  1620.  
  1621. Remarks If this property is set to a nonzero value, the images displayed on the 
  1622.         picture control are shifted left the number of pixels specified. This 
  1623.         provides a means of horizontally scrolling an image within the picture 
  1624.         control. 
  1625.  
  1626. Example This example offsets the picture image by the amount specified in a 
  1627.         horizontal scroll bar when the scroll bar position is changed: 
  1628.  
  1629.                 VOID Frame1.HScrollbar1.Change ()
  1630.                   Frame1.Picture1.XOffset = Frame1.HScrollbar1.Pos
  1631.                 end
  1632.  
  1633. See Also YOffset 
  1634.  
  1635.  
  1636. ΓòÉΓòÉΓòÉ 4.23. YOffset Property ΓòÉΓòÉΓòÉ
  1637.  
  1638. YOffset Property 
  1639.  
  1640. This property specifies the vertical offset to begin the display of picture 
  1641. control images. 
  1642.  
  1643. Syntax 
  1644.  
  1645.                 SHORT <Window>.YOffset
  1646.  
  1647. Remarks If this property is set to a nonzero value, the images displayed on the 
  1648.         picture control are shifted down the number of pixels specified. This 
  1649.         provides a means of vertically scrolling an image within the picture 
  1650.         control. 
  1651.  
  1652. Example This example offsets the picture image by the amount specified in a 
  1653.         vertical scroll bar when the scroll bar position is changed: 
  1654.  
  1655.                 VOID Frame1.VScrollbar1.Change ()
  1656.                   Frame1.Picture1.YOffset = Frame1.VScrollbar1.Pos
  1657.                 end
  1658.  
  1659. See Also XOffset 
  1660.