Adding data to a form before it is displayed on screen
Posted on 2004-10-26
I want to pass data to several checkboxes on a form before it is shown on the screen. I have a trend display with several traces on it. Everytime you want to hide a trace you have to go into a config page and set the linestyle to "none" - a bit of a pain. What I want to do is have a form (which is activated from a pushbutton) that will check the trend for how many traces there are, and select/deselect the relevant checkbox based on if the trace is present (the line style is not set to "none") - the trend is limited to only 8 traces, so if there are 6 traces on the trend, only the first 6 checkboxes will be "ticked".
After the form is shown, when a checkbox is then "unticked" the linestyle for the trace is set to none, thus not showing the trace on the trend.
I've created the form with checkboxes and labels, I can detect if a trend has been selected, I can get the number of traces on the trend and I can check what linestyle is, I just don't know how to populate the checkboxes on the form automatically.
Help Please - Caffreys.