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
 QCChart2D and QCChart2D CF (VB and C#)
 FindObj doesn't take text rotation into acoount
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MAT

1 Posts

Posted - 09 Oct 2006 :  09:20:59  Show Profile  Reply with Quote
Hello

My problem is with the FindObj class. It doesn't seem to take the rotation, of AxisTitle objects, into account. For example:


In my chart class (derived from ChartView)
private void InitializeChart()
{
 CartesianCoordinates coord = new CartesianCoordinates(0, 0, 10, 10);
 LinearAxis xAxis = new LinearAxis(coord, ChartObj.X_AXIS);
 LinearAxis yAxis = new LinearAxis(coord, ChartObj.Y_AXIS);
 NumericAxisLabels yAxisLabels = new NumericAxisLabels(yAxis);
 Font font = new Font("Microsoft Sans Serif", 7);
 AxisTitle yAxisTitle = new AxisTitle(yAxis, font, "AxisTitle");
 SelectObj selectObj = new SelectObj(this);

 xAxis.CalcAutoAxis();
 yAxis.CalcAutoAxis();
 AddChartObject(xAxis);
 AddChartObject(yAxis);
 AddChartObject(yAxisLabels);
 AddChartObject(yAxisTitle);

 SetCurrentMouseListener(new SelectObj(this));
}

The SelectObj class looks like this:
public class SelectObj : FindObj
{
 public SelectObj(ExampleGraph component)
      : base(component)
 {
 }

 public override void OnMouseDown(MouseEventArgs mouseevent)
 {
   GraphObj currentObj;

   this.SetClassToFind("AxisTitle");
   base.OnMouseDown(mouseevent);
   currentObj = this.GetSelectedObject();
   if (currentObj != null)
     ((AxisTitle)currentObj).SetTextBoxMode(true);
   else
     ((AxisTitle)currentObj).SetTextBoxMode(false);

   this.GetChartObjComponent().UpdateDraw();
 }
}


The FindObj class only seems to find the y axis title when clicking somewhere just below the middle (in the vertical direction) of the title (probably where the title would be withoout the rotation).
Can you please help me with this problem?

Thanks

quinncurtis

1164 Posts

Posted - 09 Oct 2006 :  11:32:49  Show Profile  Reply with Quote
You are correct, the FindObj class does not take into account the bouding box of rotated text. That is a glitch in the software for which we are not able to provide a work around at this time.
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