home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 401065 / WPO11 / Data1.cab / _F6F0F513BAA740E8BAE387522E7CB019 < prev    next >
Text File  |  2003-03-07  |  9KB  |  478 lines

  1. Reference: Examples of linking controls
  2.  
  3. Examples of linking controls
  4.  
  5. You can create dialog boxes and forms with a variety of controls. You must link each control to an action before it can perform a task. For example, you can write a link command for a button that displays another dialog box when clicked.
  6.  
  7. Linking bitmap buttons
  8.  
  9. The following examples give you an idea of the items you can select from the events list, the link commands list, and the other lists in the Object Link dialog box.
  10.  
  11. Example 1
  12.  
  13. Displays the dialog box named Warning2 when the button is clicked.
  14.  
  15. List    Choose
  16.  
  17. On    ON
  18.  
  19. Link Events    Clicked
  20.  
  21. Link Command    EXECUTE
  22.  
  23. Object Selector list    Warning2
  24.  
  25. Selected object Properties    Execute
  26.  
  27. Example 2
  28.  
  29. Hides the button named BitmapButton1 when the dialog box initially displays.
  30.  
  31. List    Choose
  32.  
  33. On    ON
  34.  
  35. Link Events    Init
  36.  
  37. Link Command    SET
  38.  
  39. Link Control Properties    Yes TO
  40.  
  41. Object Selector    BitmapButton1
  42.  
  43. Selected Object Properties    Hidden
  44.  
  45. Linking push buttons
  46.  
  47. A push button runs a specified command when clicked by the user.
  48.  
  49. Example 1
  50.  
  51. Makes the list box named ListBox6 run any link commands attached to it that respond to the event trigger.
  52.  
  53. List    Choose
  54.  
  55. On    ON
  56.  
  57. Link Events    Clicked
  58.  
  59. Link Command    TRIGGER
  60.  
  61. Object Selector    ListBox6
  62.  
  63. Selected Object Properties    Trigger
  64.  
  65. Linking check boxes
  66.  
  67. Example 1
  68.  
  69. Sets the text appearing by the check box button when the dialog box initially displays. The text is taken from the cell A:C23.
  70.  
  71. List    Choose
  72.  
  73. On    ON
  74.  
  75. Link Events    Init
  76.  
  77. Link Command    RECEIVE
  78.  
  79. Link Control Properties    Label_Text FROM
  80.  
  81. Object Selector    A:C23
  82.  
  83. Selected Object Properties    Value
  84.  
  85. Linking combo boxes
  86.  
  87. By default, a drop-down list is created that has an edit field where users can enter information, or they click the down arrow and choose an option from the list.
  88.  
  89. Example 1
  90.  
  91. Sets the typeface of the label named Label5 as the user scrolls through the combo box's list of items.
  92.  
  93. List    Choose
  94.  
  95. On    ON
  96.  
  97. Link Events    ValueChanged
  98.  
  99. Link Command    SEND
  100.  
  101. Link Control Properties    Value TO
  102.  
  103. Selected Object    Label5
  104.  
  105. Selected Object Properties    Label_Font.TypeFace
  106.  
  107. Linking edit fields
  108.  
  109. Example 1
  110.  
  111. Displays the point size of the active cells (or cell). This link command is triggered by another link command (see Link timer controls for an example of a link command that does this).
  112.  
  113. List    Choose
  114.  
  115. On    ON
  116.  
  117. Link Events    Init
  118.  
  119. Link Command    RECEIVE
  120.  
  121. Link Control Properties    Value FROM
  122.  
  123. Selected Object    A:A1
  124.  
  125. Selected Object Properties    Value
  126.  
  127. Example 2
  128.  
  129. As the user types text into the edit field, the text is copied into the active cell and stored there as a label (using the String_Value property).
  130.  
  131. List    Choose
  132.  
  133. On    ON
  134.  
  135. Link Events    Valuechanged
  136.  
  137. Link Command    SEND
  138.  
  139. Linked Control Properties    Value TO
  140.  
  141. Selected Object    A:A1
  142.  
  143. Selected Object Properties    String_Value
  144.  
  145. Example 3
  146.  
  147. When the user types text into the edit field and presses ENTER, the text is entered into the active cell exactly as it was typed by the user.
  148.  
  149. List    Choose
  150.  
  151. On    ON
  152.  
  153. Link Events    Enter
  154.  
  155. Link Commands    SEND
  156.  
  157. Linked Control Properties    Value TO
  158.  
  159. Selected Object    A:B1
  160.  
  161. Selected Object Properties    Value
  162.  
  163. Example 4
  164.  
  165. Sends the edit field's value to A:A34 whenever the user presses ENTER. Using Number_Value ensures that the entry is always stored as a value.
  166.  
  167. List    Choose
  168.  
  169. On    ON
  170.  
  171. Link Events    Enter
  172.  
  173. Link Commands    SEND
  174.  
  175. Link Control Properties    Value TO
  176.  
  177. Selected Object    A:A34
  178.  
  179. Selected Object Properties    Number_Value
  180.  
  181. Example 5
  182.  
  183. If the edit field is named EditInteger3, this link command sets the edit field's maximum acceptable value to the current value whenever the user presses ENTER. This is handy for setting up an edit field that has no maximum value, but still has a minimum value (set by the Minimum property).
  184.  
  185. List    Choose
  186.  
  187. On    ON
  188.  
  189. Link Events    Enter
  190.  
  191. Link Command    SEND
  192.  
  193. Link Control Properties    Value TO
  194.  
  195. Selected Object    EditInteger3
  196.  
  197. Selected Object Properties    Maximum
  198.  
  199. Linking file controls
  200.  
  201. Example 1
  202.  
  203. Sets the initial wildcard displayed by the file select control named FileCtrl6. All files with the extension .bdg are displayed.
  204.  
  205. List    Control
  206.  
  207. On    ON
  208.  
  209. Link Events    Init
  210.  
  211. Link Commands    SET
  212.  
  213. Linked Control Properties    *.BDG TO
  214.  
  215. Selected Object    FileCtrl6
  216.  
  217. Selected Object Properties    Value
  218.  
  219. Example 2
  220.  
  221. Sets the initial directory displayed by the file select control named FileCtrl6 to FILES on the C: drive.
  222.  
  223. List    Choose
  224.  
  225. On    ON
  226.  
  227. Link Events    Init
  228.  
  229. Link Commands    SET
  230.  
  231. Linked Control Properties    C:\FILES\ TO
  232.  
  233. Selected Object    FileCtrl6
  234.  
  235. Selected Object Properties    Value
  236.  
  237. Linking group boxes
  238.  
  239. Example 1
  240.  
  241. Sets the text of the label named Label5 whenever a different radio button in the group box is chosen.
  242.  
  243. List    Choose
  244.  
  245. On    ON
  246.  
  247. Link Events    Valuechanged
  248.  
  249. Link Commands    SEND
  250.  
  251. Linked Control Properties    Value TO
  252.  
  253. Selected Object    Label5
  254.  
  255. Selected Object Properties    Label_Text
  256.  
  257. Linking scroll bars
  258.  
  259. Example 1 (Horizontal scroller link)
  260.  
  261. Sets the active cell to the scroll bar's value.
  262.  
  263. List    Choose
  264.  
  265. On    ON
  266.  
  267. Link Events    Valuechanged
  268.  
  269. Link Commands    SEND
  270.  
  271. Link Control Properties    Value TO 
  272.  
  273. Selected Object    A:A1
  274.  
  275. Selected Object Properties    Value
  276.  
  277. Example 2 (Horizontal scroller link)
  278.  
  279. Sets the initial value of the scroll bar to the value stored in A:C67.
  280.  
  281. List    Choose
  282.  
  283. On    ON
  284.  
  285. Link Events    Init
  286.  
  287. Link Commands    RECEIVE
  288.  
  289. Linked Control Properties    Value FROM
  290.  
  291. Selected Object    A:C67
  292.  
  293. Selected Object Properties    Value
  294.  
  295. Example 3 (Vertical scroller link)
  296.  
  297. Sets the text color of the active cell (or cells) whenever the scroll bar's value is changed. Make sure the scroll bar is restricted to the range 0 through 15.
  298.  
  299. List    Choose
  300.  
  301. On    ON
  302.  
  303. Link Events    Valuechanged
  304.  
  305. Link Commands    SEND
  306.  
  307. Linked Control Properties    Value TO
  308.  
  309. Selected Object    A:A12
  310.  
  311. Selected Object Properties    Text_Color
  312.  
  313. Linking list boxes
  314.  
  315. Example 1
  316.  
  317. Sets the list displayed to the cells stored as a label in cell A:A25 when the dialog box initially displays.
  318.  
  319. List    Choose
  320.  
  321. On    ON
  322.  
  323. Link Events    Init
  324.  
  325. Link Commands    RECEIVE
  326.  
  327. Linked Control Properties    List FROM
  328.  
  329. Selected Object    A:A25
  330.  
  331. Selected Object Properties    Value
  332.  
  333. Example 2
  334.  
  335. Sets the list displayed to the cells stored as a label in cell A:A25 when another control uses the link command TRIGGER to generate the trigger event.
  336.  
  337. List    Choose
  338.  
  339. On    ON
  340.  
  341. Link Events    Trigger
  342.  
  343. Link Command    RECEIVE
  344.  
  345. Link Control Properties    List FROM
  346.  
  347. Selected Object    A:A25
  348.  
  349. Selected Object Properties    Value
  350.  
  351. Example 3
  352.  
  353. Sets the title of the pick list button named PickList5 to Blocks when the dialog box initially displays.
  354.  
  355. List    Choose
  356.  
  357. On    ON
  358.  
  359. Link Events    Init
  360.  
  361. Link Commands    SET
  362.  
  363. Linked Control Properties    Blocks TO
  364.  
  365. Selected Object    PickList5
  366.  
  367. Selected Object Properties    Label_Text
  368.  
  369. Linking radio buttons
  370.  
  371. Example 1
  372.  
  373. Displays the message stored in the cells A:A1..C3 whenever the radio button is selected by the user.
  374.  
  375. List    Choose
  376.  
  377. On    ON
  378.  
  379. Link Events    Activate
  380.  
  381. Link Commands    DOMACRO
  382.  
  383. Selected Object    {MESSAGE A:A1..C3,0,0,0}
  384.  
  385. Example 2
  386.  
  387. Sets the initial text appearing by the radio button to whatever is stored in cell A:C3.
  388.  
  389. List    Choose
  390.  
  391. On    ON
  392.  
  393. Link Events    Init
  394.  
  395. Link Commands    RECEIVE
  396.  
  397. Link Control Properties    Label_Text FROM
  398.  
  399. Selected Object    A:C3
  400.  
  401. Selected Object Properties    Value
  402.  
  403. Linking spin controls
  404.  
  405. Example 1
  406.  
  407. Sets the shading blend of the active cell or cells. Make sure the spin control is restricted to the range 0 through 6.
  408.  
  409. List    Choose
  410.  
  411. On    ON
  412.  
  413. Link Events    Valuechanged
  414.  
  415. Link Command    SEND
  416.  
  417. Link Control Properties    Value TO
  418.  
  419. Selected Object    A:A1
  420.  
  421. Selected Object Properties    Value
  422.  
  423. Example 2
  424.  
  425. Sets the height of the rectangle named Rectangle2 whenever the spin control's value changes.
  426.  
  427. List    Choose
  428.  
  429. On    ON
  430.  
  431. Link Events    Valuechanged
  432.  
  433. Link Commands    SEND
  434.  
  435. Link Control Properties    Value TO
  436.  
  437. Selected Object    Rectangle2
  438.  
  439. Selected Object Properties    Dimension.Height
  440.  
  441. Linking timer controls
  442.  
  443. Example 1
  444.  
  445. Tells the edit field named EditField6 to run any link commands attached to it that respond to the event trigger. Use this to create edit fields that constantly retrieve settings from the active object (cells, notebook, sheet, and so on).
  446.  
  447. List    Choose
  448.  
  449. On    ON
  450.  
  451. Link Events    Timer
  452.  
  453. Link Commands    TRIGGER
  454.  
  455. Selected Object    EditField6
  456.  
  457. Selected Object Properties    Trigger
  458.  
  459. Example 2
  460.  
  461. Displays a message stored in the cells A:A1..C3 when the time specified in the timer control's Alarm Time property is reached.
  462.  
  463. List    Choose
  464.  
  465. On    ON
  466.  
  467. Link Events    Alarm
  468.  
  469. Link Command    DOMACRO
  470.  
  471. Selected Object    {MESSAGE A:A1..C3,0,0,0}
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.