Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / February 2008

Tip: Looking for answers? Try searching our database.

Overflowing GUI control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sharon - 22 Feb 2008 09:55 GMT
Hi,

I have a form with TabControl and a TabPage in it.
In the tag control there is panel control (lets call it panelA) and in it my
user control that include few control inside of it.

In my development computer everything looks fine. But on some other
computers, the panelA control is overflowing outside the right boundary of
the TabPage together with all of its child controls.

What can cause this kind of a problem?

I'm using VS2005 on a WinXP SP2.

-------
Thanks
Sharon
Nicholas Paldino [.NET/C# MVP] - 22 Feb 2008 13:13 GMT
Sharon,

   Can you post a complete example to show the issue?

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> Hi,
>
[quoted text clipped - 14 lines]
> Thanks
> Sharon
Rene - 22 Feb 2008 15:29 GMT
Other than what Nicholas suggested about posting an example, could it be
that your project is compiled using an older version of the .Net as the
version the other computer is running?

In other words, are you perhaps compiling your project using .Net 2.0 but
then the client computer only has .Net 3.0 or .Net 3.5 therefore *possible*
creating this problem?

Just a wild guess.

> Hi,
>
[quoted text clipped - 14 lines]
> Thanks
> Sharon
Sharon G. - 24 Feb 2008 09:02 GMT
I'm compiling with .NET framework 2.0 and using the same framework on the other computer. So I guess this is not the problem.

I have cut out everything possible from the project, yet the controls overflowing still occur.
I have also attached the project (using the Outlook Express).
And here is the code:

//////////////////////////////////////////////////////////////////////////
//  The Program.cs file
using System;

using System.Windows.Forms;

namespace MultiBScanDisplay

{

class Program

{

[STAThread]

static void Main(string [] args)

{

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(false);

Application.Run(new EvaluationForm());

}

}

}

//////////////////////////////////////////////////////////////////////////
//  The EvaluationForm.Designer.cs file
namespace MultiBScanDisplay

{

public partial class EvaluationForm

{

/// <summary>

/// Required designer variable.

/// </summary>

private System.ComponentModel.IContainer components = null;

/// <summary>

/// Clean up any resources being used.

/// </summary>

/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>

protected override void Dispose(bool disposing)

{

if (disposing && (components != null))

{

components.Dispose();

}

base.Dispose(disposing);

}

#region Windows Form 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.m_patchResultsTab = new System.Windows.Forms.TabControl();

this.m_firstTabPage = new System.Windows.Forms.TabPage();

this.evaluationResultsGroupBox = new System.Windows.Forms.GroupBox();

this.m_patchResultsTab.SuspendLayout();

this.SuspendLayout();

//

// m_patchResultsTab

//

this.m_patchResultsTab.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)

| System.Windows.Forms.AnchorStyles.Left)

| System.Windows.Forms.AnchorStyles.Right)));

this.m_patchResultsTab.Controls.Add(this.m_firstTabPage);

this.m_patchResultsTab.Location = new System.Drawing.Point(26, 184);

this.m_patchResultsTab.Multiline = true;

this.m_patchResultsTab.Name = "m_patchResultsTab";

this.m_patchResultsTab.SelectedIndex = 0;

this.m_patchResultsTab.Size = new System.Drawing.Size(1086, 363);

this.m_patchResultsTab.TabIndex = 11;

//

// m_firstTabPage

//

this.m_firstTabPage.Location = new System.Drawing.Point(4, 25);

this.m_firstTabPage.Name = "m_firstTabPage";

this.m_firstTabPage.Padding = new System.Windows.Forms.Padding(3);

this.m_firstTabPage.Size = new System.Drawing.Size(1078, 334);

this.m_firstTabPage.TabIndex = 0;

this.m_firstTabPage.UseVisualStyleBackColor = true;

//

// evaluationResultsGroupBox

//

this.evaluationResultsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)

| System.Windows.Forms.AnchorStyles.Left)

| System.Windows.Forms.AnchorStyles.Right)));

this.evaluationResultsGroupBox.Location = new System.Drawing.Point(10, 152);

this.evaluationResultsGroupBox.Name = "evaluationResultsGroupBox";

this.evaluationResultsGroupBox.Size = new System.Drawing.Size(1112, 408);

this.evaluationResultsGroupBox.TabIndex = 14;

this.evaluationResultsGroupBox.TabStop = false;

this.evaluationResultsGroupBox.Text = "Evaluation Results";

//

// EvaluationForm

//

this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.ClientSize = new System.Drawing.Size(1133, 637);

this.Controls.Add(this.m_patchResultsTab);

this.Controls.Add(this.evaluationResultsGroupBox);

this.Margin = new System.Windows.Forms.Padding(5);

this.Name = "EvaluationForm";

this.Text = "1,000 Gates";

this.m_patchResultsTab.ResumeLayout(false);

this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.GroupBox evaluationResultsGroupBox;

private System.Windows.Forms.TabPage m_firstTabPage;

private System.Windows.Forms.TabControl m_patchResultsTab;

}

}

 
//////////////////////////////////////////////////////////////////////////
//  The EvaluationForm.resx file

<?xml version="1.0" encoding="utf-8"?>

<root>

<!--

Microsoft ResX Schema

Version 2.0

The primary goals of this format is to allow a simple XML format

that is mostly human readable. The generation and parsing of the

various data types are done through the TypeConverter classes

associated with the data types.

Example:

... ado.net/XML headers & schema ...

<resheader name="resmimetype">text/microsoft-resx</resheader>

<resheader name="version">2.0</resheader>

<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>

<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>

<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>

<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>

<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">

<value>[base64 mime encoded serialized .NET Framework object]</value>

</data>

<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>

<comment>This is a comment</comment>

</data>

There are any number of "resheader" rows that contain simple

name/value pairs.

Each data row contains a name, and value. The row also contains a

type or mimetype. Type corresponds to a .NET class that support

text/value conversion through the TypeConverter architecture.

Classes that don't support this are serialized and stored with the

mimetype set.

The mimetype is used for serialized objects, and tells the

ResXResourceReader how to depersist the object. This is currently not

extensible. For a given mimetype the value must be set accordingly:

Note - application/x-microsoft.net.object.binary.base64 is the format

that the ResXResourceWriter will generate, however the reader can

read any of the formats listed below.

mimetype: application/x-microsoft.net.object.binary.base64

value : The object must be serialized with

: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter

: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.soap.base64

value : The object must be serialized with

: System.Runtime.Serialization.Formatters.Soap.SoapFormatter

: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.bytearray.base64

value : The object must be serialized into a byte array

: using a System.ComponentModel.TypeConverter

: and then encoded with base64 encoding.

-->

<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">

<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />

<xsd:element name="root" msdata:IsDataSet="true">

<xsd:complexType>

<xsd:choice maxOccurs="unbounded">

<xsd:element name="metadata">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="value" type="xsd:string" minOccurs="0" />

</xsd:sequence>

<xsd:attribute name="name" use="required" type="xsd:string" />

<xsd:attribute name="type" type="xsd:string" />

<xsd:attribute name="mimetype" type="xsd:string" />

<xsd:attribute ref="xml:space" />

</xsd:complexType>

</xsd:element>

<xsd:element name="assembly">

<xsd:complexType>

<xsd:attribute name="alias" type="xsd:string" />

<xsd:attribute name="name" type="xsd:string" />

</xsd:complexType>

</xsd:element>

<xsd:element name="data">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />

<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />

</xsd:sequence>

<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />

<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />

<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />

<xsd:attribute ref="xml:space" />

</xsd:complexType>

</xsd:element>

<xsd:element name="resheader">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />

</xsd:sequence>

<xsd:attribute name="name" type="xsd:string" use="required" />

</xsd:complexType>

</xsd:element>

</xsd:choice>

</xsd:complexType>

</xsd:element>

</xsd:schema>

<resheader name="resmimetype">

<value>text/microsoft-resx</value>

</resheader>

<resheader name="version">

<value>2.0</value>

</resheader>

<resheader name="reader">

<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>

</resheader>

<resheader name="writer">

<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>

</resheader>

</root>

 
//////////////////////////////////////////////////////////////////////////
//  The EvaluationForm.cs file

using System.Windows.Forms;

namespace MultiBScanDisplay

{

public partial class EvaluationForm : Form

{

public EvaluationForm()

{

InitializeComponent();

}

}

}

/////////////////////////////////////////////////////////////////////

Signature

Thanks
Sharon

Rene - 25 Feb 2008 17:31 GMT
Sharon,

Cold you post some pictures showing the “overflowing” problem (a picture
showing the current rendering and one showing the overflow)?

I am not sure what exactly to look for.

Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.