03-18-2005 02:34 PM
03-19-2005 12:52 AM
Private Sub Check1_Click(Index As Integer)
' Get the plot at the corresponding control array index and set its
' Visible property to the value of the CheckBox.
CWGraph1.Plots(Index + 1).Visible = Check1(Index).Value
End Sub
03-21-2005 08:26 AM
@Elton Wells wrote:
To chart the two dimensional array, pass the array to the CWGraph.ChartY method.
To control which channels are displayed via CheckBoxes, you can create a control array of CheckBoxes, add a Click event handler for the control array, then retrieve the plot at the associated control array and set its Visible property accordingly. For example, add a checkbox, select it and press Ctrl+C to copy it, and then paste it. Visual Basic will prompt you with a message that says "You already have a control named 'Check1'. Do you want to create a control array?" Click Yes, then keep pasting CheckBoxes until you have your 11 CheckBoxes. Double-click on one of the CheckBoxes to create an event handler for the control array, then add the following code:
Private Sub Check1_Click(Index As Integer)
' Get the plot at the corresponding control array index and set its
' Visible property to the value of the CheckBox.
CWGraph1.Plots(Index + 1).Visible = Check1(Index).Value
End Sub
I'm not 100% sure what you're trying to do with the drop-down selection list, but if I'm understanding it correctly, I think you'll have to keep track of what set of data is associated with each item in the list and when a different item is selected, you'll have to replot the data that's associated with that item.
- Elton
03-21-2005 11:14 AM
03-21-2005 11:24 AM