Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 Real-Time Graphics Tools for .Net (VB and C#)
 Control Array
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mahinda

4 Posts

Posted - 31 May 2005 :  11:44:42  Show Profile  Reply with Quote
Can we make a control array with Meter or scroll graph User Controls. I attempted to make one but I am getting an error at the time.

quinncurtis

1164 Posts

Posted - 31 May 2005 :  12:46:07  Show Profile  Reply with Quote
I don't know what you mean by a control array, or what you are trying to do with it. Please explain in much more detail.
Go to Top of Page

mahinda

4 Posts

Posted - 01 Jun 2005 :  16:41:29  Show Profile  Reply with Quote
Lets say we have a list of names on a list box. The user can pick any name from the list. Each name represent a seperate set of parameters those you need to draw a meter or graph (Title, Value, Max and Minimum values etc).

What I want to do is when a user pick a name from the list I want to graph a meter or graph with the relevant parameters belongs to the selected name. So every time the parameters of the control change according to the name the user pick. This means probably I may have to call InitializeGraph every time a user pick a name.

I need a form with four meters in the locations (Top left, Top right, Bottom left and Bottom right) and the user should able to select any of those and then pick a name from the list. That way the newly picked meter will display on the location that the user selected. (ex: Top left)
Go to Top of Page

quinncurtis

1164 Posts

Posted - 01 Jun 2005 :  17:35:55  Show Profile  Reply with Quote
You should be able to do what you describe. It seems that you should be able to create a single User Control that combines a list box and one of our graphs, that does what you want. Once you get that to work you would create 4 instances of that control, one for each quatrant. It sounds like a general .Net programming issue and not directly related to the QCRTGraph .Net software.
Go to Top of Page

mahinda

4 Posts

Posted - 06 Jun 2005 :  12:47:47  Show Profile  Reply with Quote
I have a user control with a meter. I have a form where I have drawn (drop) the user control and then a listbox. I also have a button.

The user select an item from the listbox and then click on the button. According to the item the meter control should change. For example each item on the listbox has a unque description, Minimum, Maximum values, Min and Max alarms values and Units. Based on the item the timer1 gets its value from different locations.

What I did was every time the user click on the button I go and get the parameters as I explained above and then called UserControl1.InitializeGraph(). Inside the InitializeGraph() I have InitializeMeter(). It works alright for the first selection. But next time onwards the parameters of the graph does not change.

How should I clean up the previous Initialize before called it with different set of parameters. In other words how can we destroy the previous instance
Go to Top of Page

quinncurtis

1164 Posts

Posted - 06 Jun 2005 :  15:14:34  Show Profile  Reply with Quote
All of the objects added to the ChartView are stored in a list. If you want to reset the list back to empty, you can do that with the ChartView ResetChartObjList method.


private void InitializeMeter()
{
  ChartView chartVu  = this;
  this.ResetChartObjectList();
  CartesianCoordinates pTransform1 = new CartesianCoordinates( 0.0, 0.0, 1.0, ymax);


You should also verify by placing a breakpoint in the InitializeMeter method that the method is being called everytime the button is clicked, and that indeed the new parameters for the meter reflect the parameters that you want.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07