Hi Steema Support,
I am using rectangle tool in my application for showing data and using font "Consolas".With this font data plotted(shown) with proper alignment . But when we use font type "Times New Roman" it changes the alignment of the data and it is shown unmanaged in Rectangle tool.
Is there any way to set the proper alignment using "Times New Roman" font. Please find the attched application to see the changes in alignment.
Please provide any solution for the same asap.
Thanks in advance
Thanks & Regards
PlanoResearch
Font issue in Rectangle tool
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Font issue in Rectangle tool
Hello,
As this video shows, the behaviour in this case is expected.
Do you get the same results as in the video above? Which version are you using?
As this video shows, the behaviour in this case is expected.
Do you get the same results as in the video above? Which version are you using?
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Font issue in Rectangle tool
Hi Steema Support,
Thanks for your reply.
Yes, we got the same result as shown in the vedio.I am using Teechart version 4.1.2011.4191.
Please suggest any solution.
Thanks&Regards
PlanoResearch
Thanks for your reply.
Yes, we got the same result as shown in the vedio.I am using Teechart version 4.1.2011.4191.
Please suggest any solution.
Thanks&Regards
PlanoResearch
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Font issue in Rectangle tool
As I said, this is expected behaviour - I do not see what the problem is, therefore, I cannot suggest a solution.amol wrote: Yes, we got the same result as shown in the vedio.I am using Teechart version 4.1.2011.4191.
Please suggest any solution.
Can you please tell me the behaviour you would like to see that is different to the default behaviour?
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Font issue in Rectangle tool
Hi Christoper,
As shown in video that is previously given by you. In this video it is clearly shown when we press button "Change Font to Times New Roman" then data inside the rectangle tool shows unmanaged this is the issue that we do not want. And when we press button"Change Font to Consolas" then rectangle tool data shows managed or with proper alignment. It look good.
So we want to manage the rectangle tool data alignment with "Times New Roman" also.
Hoping it will help you to clarify the issue.
Please provide any solution for the same.
Thanks&Regards
PlanoResearch
As shown in video that is previously given by you. In this video it is clearly shown when we press button "Change Font to Times New Roman" then data inside the rectangle tool shows unmanaged this is the issue that we do not want. And when we press button"Change Font to Consolas" then rectangle tool data shows managed or with proper alignment. It look good.
So we want to manage the rectangle tool data alignment with "Times New Roman" also.
Hoping it will help you to clarify the issue.
Please provide any solution for the same.
Thanks&Regards
PlanoResearch
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Font issue in Rectangle tool
Try using a standard System.Windows.Forms.TextBox to compare behaviour, e.g.amol wrote: Hoping it will help you to clarify the issue.
Please provide any solution for the same.
Code: Select all
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
Points point;
public RectangleTool rect;
TextBox textBox;
public Form1()
{
InitializeComponent();
point = new Points(tChart1.Chart);
point.FillSampleValues(30);
tChart1.Aspect.View3D = false;
rect = new RectangleTool(tChart1.Chart);
rect.Top = 100;
rect.Left = 200;
rect.Active = true;
rect.Shape.Font.Name = "Consolas";
rect.AutoSize = true;
List<string> lstResultName = new List<string>();
lstResultName.Add("First Element");
lstResultName.Add("Second Element");
lstResultName.Add("Third Element");
lstResultName.Add("Fourth Element");
List<string> lstResultUnit = new List<string>();
lstResultUnit.Add("aaa");
lstResultUnit.Add("bbbbrer");
lstResultUnit.Add("cc");
lstResultUnit.Add("dddd");
List<string> lstResultValue = new List<string>();
lstResultValue.Add("29111");
lstResultValue.Add("2221");
lstResultValue.Add("12123233");
lstResultValue.Add("3333434");
SetResults(lstResultName,lstResultUnit,lstResultValue);
textBox = new TextBox();
textBox.Multiline = true;
textBox.Width = 300;
textBox.Height = 100;
tChart1.Controls.Add(textBox);
textBox.Text = rect.Text;
}
public void SetResults(List<string> lstResultName, List<string> lstResultUnit, List<string> lstResultValue)
{
string strResults = string.Empty;
int max = 0;
int index1 = 0;
int total = 0;
for (int i = 0; i < lstResultName.Count; i++)
{
if (lstResultUnit[i] != string.Empty)
{
if (max < lstResultName[i].Length + lstResultUnit[i].Length)
{
max = lstResultName[i].Length + lstResultUnit[i].Length;
}
}
}
for (int i = 0; i < lstResultName.Count; i++)
{
if (lstResultUnit[i] != string.Empty)
{
total = lstResultName[i].Length + lstResultUnit[i].Length;
if (max == total)
{
string str = lstResultName[i];
str = str + " ";
lstResultName[i] = str;
}
else
{
string str = lstResultName[i];
for (int j = 0; j < max - (total); j++)
{
str = str + " ";
}
str = str + " ";
lstResultName[i] = str;
}
}
}
for (int i = 0; i < lstResultUnit.Count; i++)
{
if (lstResultUnit[i] != string.Empty)
{
string str = lstResultUnit[i];
str = "[" + str + "] " + "=" + " ";
lstResultUnit[i] = str;
}
}
for (int i = 0; i < lstResultName.Count; i++)
{
if (lstResultUnit[i] != string.Empty)
{
strResults = strResults + lstResultName[i] + lstResultUnit[i] + lstResultValue[i] + "\r\n";
index1++;
}
else
{
strResults = strResults + lstResultName[i] + lstResultUnit[i] + lstResultValue[i] + "\r\n";
}
}
if (index1 == 0)
{
rect.Active = false;
}
rect.Text = strResults;
}
private void button1_Click(object sender, EventArgs e)
{
rect.Shape.Font.Name = "Times New Roman";
textBox.Font = new Font(rect.Shape.Font.Name, 8);
}
private void button2_Click(object sender, EventArgs e)
{
rect.Shape.Font.Name = "Consolas";
textBox.Font = new Font(rect.Shape.Font.Name, 8);
}
}
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |