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#)
 SetMinimumSize quinncurtis.chart2dnet.ChartView
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

zeng

2 Posts

Posted - 07 Nov 2008 :  09:04:24  Show Profile  Reply with Quote

I program with VS 2005 C#. In my Form, I want to user the class ThermostatUserControl1 : com.quinncurtis.chart2dnet.ChartView in the Examples :C:\Quinn-Curtis\DotNet\QCRTGraph\Visual CSharp\examples\HomeAutomation
But I can't changer the size of this class smaller than 200 X 200.
I use this code :
SetMinimumSize( new Size(100,100));
but it is always 200 X 200.
Who can help me? It is urgent.

Zeng

quinncurtis

1164 Posts

Posted - 07 Nov 2008 :  11:18:56  Show Profile  Reply with Quote
We added the SetMinimumSize line to the ThermostatUserControl1 class:

public ThermostatUserControl1()
{
this.SetMinimumSize( new Size(100, 100));

// This call is required by the Windows.Forms Form Designer.
InitializeComponent();

// TODO: Add any initialization after the InitForm call
}

And we changed the size in the HomeAutomationUserControl1 property initialization code.

#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.thermostatUserControl11.BackgroundDrawEnable = true;
this.thermostatUserControl11.Location = new System.Drawing.Point(16, 16);
this.thermostatUserControl11.Name = "thermostatUserControl11";
this.thermostatUserControl11.RenderingMode = 0;
this.thermostatUserControl11.ResizeMode = 1;
this.thermostatUserControl11.Size = new System.Drawing.Size(100, 100);
this.thermostatUserControl11.TabIndex = 0;
this.thermostatUserControl11.TemperatureSetpointValue = 70;
this.thermostatUserControl11.ThermostatTitle = "Zone 1";
this.thermostatUserControl11.ZOrderSortEnable = true;
.
.
.
}

It worked. The control does not look OK, because it was designed for the 200x200 size, but it does resize to the 100,100 control size.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 07 Nov 2008 :  11:56:38  Show Profile  Reply with Quote
We also found that it helped to change the size setting in the ThermostatUserControl1 class, in the InitializeComponent method.

this.Name = "ThermostatUserControl1";
this.Size = new System.Drawing.Size(100, 100);
this.ResumeLayout(false);
Go to Top of Page

zeng

2 Posts

Posted - 08 Nov 2008 :  13:49:39  Show Profile  Reply with Quote
I understand, thank you very much.
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