-
Dec 15th, 2014, 09:05 AM
#1
-
Dec 15th, 2014, 09:29 AM
#2
Re: User Control being "truncated"
Could you post the UC's designer code file and any UI customizations in the main code file?
-
Dec 15th, 2014, 09:52 AM
#3
Re: User Control being "truncated"
There are no UI Customizations in the man file.
Here's the designer code:-
Code:
partial class ConnectionStringBuilder
{
/// <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 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.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripDropDownButtonProvider = new System.Windows.Forms.ToolStripDropDownButton();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.buttonTestConnection = new System.Windows.Forms.Button();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripDropDownButtonProvider});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(629, 27);
this.toolStrip1.TabIndex = 0;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripDropDownButtonProvider
//
this.toolStripDropDownButtonProvider.Image = global::ProdapsClusterViewer.Properties.Resources.DataSources;
this.toolStripDropDownButtonProvider.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButtonProvider.Name = "toolStripDropDownButtonProvider";
this.toolStripDropDownButtonProvider.Size = new System.Drawing.Size(164, 24);
this.toolStripDropDownButtonProvider.Text = "Choose Sql Flavour";
this.toolStripDropDownButtonProvider.ToolTipText = "Choose SQL Flavour";
//
// propertyGrid1
//
this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.propertyGrid1.Location = new System.Drawing.Point(4, 34);
this.propertyGrid1.Margin = new System.Windows.Forms.Padding(4);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.Size = new System.Drawing.Size(621, 370);
this.propertyGrid1.TabIndex = 1;
//
// buttonTestConnection
//
this.buttonTestConnection.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.buttonTestConnection.Location = new System.Drawing.Point(4, 412);
this.buttonTestConnection.Margin = new System.Windows.Forms.Padding(4);
this.buttonTestConnection.Name = "buttonTestConnection";
this.buttonTestConnection.Size = new System.Drawing.Size(160, 28);
this.buttonTestConnection.TabIndex = 2;
this.buttonTestConnection.Text = "&Test Connection";
this.buttonTestConnection.UseVisualStyleBackColor = true;
this.buttonTestConnection.Click += new System.EventHandler(this.buttonTestConnection_Click);
//
// ConnectionStringBuilder
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.buttonTestConnection);
this.Controls.Add(this.propertyGrid1);
this.Controls.Add(this.toolStrip1);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "ConnectionStringBuilder";
this.Size = new System.Drawing.Size(629, 486);
this.Load += new System.EventHandler(this.ConnectionStringBuilder_Load);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButtonProvider;
private System.Windows.Forms.PropertyGrid propertyGrid1;
private System.Windows.Forms.Button buttonTestConnection;
}
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
-
Dec 15th, 2014, 09:54 AM
#4
Re: User Control being "truncated"
What's your platform? I've started seeing something like this on a Win8.1 Surface, though I have yet to track down a cause (or even look, for that matter).
My usual boring signature: Nothing
-
Dec 15th, 2014, 10:10 AM
#5
Re: User Control being "truncated"
I can not reproduce your problem. The only thing that I can think of is that you been building up this control bit by bit with intermediate builds and the designer has cached instances that are causing problems. This seems unlikely though considering how simple this control is, but try exiting VS and do a Clean/Build cycle after you restart.
Edit: Make sure the Form designer is closed or delete the control from the Form first.
Last edited by TnTinMN; Dec 15th, 2014 at 10:16 AM.
-
Dec 15th, 2014, 10:23 AM
#6
Re: User Control being "truncated"
Win 7.
Clean/Build cycle after you restart
Already tried that. Turning VS off and on again fixes an uncomfortable number of mysterious behaviours
I've got a vague memory of something like this no a project I worked on years ago. I think the problem was something to do with the access level on the control. I'm damned if I can remember what the solution was, though, or even if the problem was exactly the same as this so it could be a red herring.
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
-
Dec 15th, 2014, 11:07 AM
#7
Re: User Control being "truncated"
To be honest, I rarely use the UserControl template as I ran into issues with it when I first started with .Net and I moved to just writing my own inherited controls. It was probably my lack of knowledge at the time, but it worked for me.
That said and using a little C&P, give this a try and see what happens:
Code:
public class CSB : System.Windows.Forms.ContainerControl
{
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButtonProvider;
private System.Windows.Forms.PropertyGrid propertyGrid1;
private System.Windows.Forms.Button buttonTestConnection;
public CSB()
{
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.buttonTestConnection = new System.Windows.Forms.Button();
this.toolStripDropDownButtonProvider = new System.Windows.Forms.ToolStripDropDownButton();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripDropDownButtonProvider});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(472, 25);
this.toolStrip1.TabIndex = 0;
this.toolStrip1.Text = "toolStrip1";
//
// propertyGrid1
//
this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Top;
this.propertyGrid1.Location = new System.Drawing.Point(0, 25);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.Size = new System.Drawing.Size(472, 301);
this.propertyGrid1.TabIndex = 1;
//
// buttonTestConnection
//
this.buttonTestConnection.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonTestConnection.Location = new System.Drawing.Point(0, 336);
this.buttonTestConnection.Name = "buttonTestConnection";
this.buttonTestConnection.Size = new System.Drawing.Size(120, 23);
this.buttonTestConnection.TabIndex = 2;
this.buttonTestConnection.Text = "&Test Connection";
this.buttonTestConnection.UseVisualStyleBackColor = true;
//
// toolStripDropDownButtonProvider
//
// ****************************** Set your Image
this.toolStripDropDownButtonProvider.Image = global::WindowsFormsApplication1.Properties.Resources.m1;
// ******************************
this.toolStripDropDownButtonProvider.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButtonProvider.Name = "toolStripDropDownButtonProvider";
this.toolStripDropDownButtonProvider.Size = new System.Drawing.Size(137, 22);
this.toolStripDropDownButtonProvider.Text = "Choose Sql Flavour";
this.toolStripDropDownButtonProvider.ToolTipText = "Choose SQL Flavour";
//
// ConnectionStringBuilder
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.buttonTestConnection);
this.Controls.Add(this.propertyGrid1);
this.Controls.Add(this.toolStrip1);
this.Name = "ConnectionStringBuilder";
this.Size = new System.Drawing.Size(472, 364);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
}
You know, I would have thought that a good Moderator would have moved this thread to the appropriate (Language) Forum!
-
Dec 15th, 2014, 12:01 PM
#8
Re: User Control being "truncated"
the appropriate (Language) Forum
It's fair cop, guv. I wasn't expecting to have to post code when I started the thread so I went with the busier VB forum.
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|