Accessing a WorksheetControl Control with Origin C

The WksControl example demonstrates how to access a worksheet control in a Dialog Builder resource. To access the worksheet control in the Worksheet Control dialog below the example program uses the Origin C WorksheetControl class. The example dialog is launched by executing the function LaunchWksControl in the source file WksControl.cpp found in this zip file, under the \Dialog Builder\WksControl subfolder.

Accessing a WorksheetControl Control with Origin C image151.gif

To launch the Worksheet Control dialog above:

  1. Open the source file WksControl.cpp in Code Builder.
  2. Add WksControl.cpp to the Code Builder workspace by activating it and pressing the CTRL + W keys.
  3. Build WksControl.cpp by clicking the Build button Accessing a WorksheetControl Control with Origin C image12.gif.
  4. In Origin create some worksheets each having a different number of columns. Vary the column designations, formats, and display and enter some varied data.
  5. Type LaunchWksControl in the Script Window or LabTalk Console and press the ENTER key.
  6. With the Worksheet Control dialog open and visible browse around activating different worksheets and notice how the worksheet control in the dialog changes.