Search
Active

4
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 407931
Opened: 1/29/2009 2:04:01 PM
Access Restriction: Public
0
Workaround(s)
2
User(s) can reproduce this bug
「SplitContainer」で「Panel2MinSize」を設定すると実行時にエラーが発生してしまいます。
環境は、VS2008SP1でIntellisenseを日本語化した環境。OSはWindowsXPSP3です。
フォームデザインで「SplitContainer」コントロールを貼り付け、
デザイナの「Panel2MinSize」プロパティを設定してから、
デザインファイルの「Panel2MinSize」プロパティを設定するところでエラーが発生してしまいます。
多分原因は「Size」プロパティよりも先に「Panel2MinSize」プロパティを設定しまっているところだと思うのです。
Details (expand)
製品言語
日本語
バージョン
Visual Studio 2008 SP1
オペレーティング システム
Windows XP
オペレーティング システム言語
日本語
再現の手順
1.フォームにSplitContainerを配置する。
2.Panel2MinSizeをフォームの半分くらいのサイズに設定する。
3.フォームの幅を1/4くらいに設定する。
4.デバッグ実行する

例えば、フォームサイズが640,480でSplitContainerを配置するし、
SplitContainerのPanel2MinSizeプロパティを200に設定すると
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 24);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.treeView1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.listView1);
this.splitContainer1.Panel2MinSize = 200;
this.splitContainer1.Size = new System.Drawing.Size(392, 242);
this.splitContainer1.TabIndex = 1;
フォームのデザインファイルに上記ようなコードができます。
以上のようなコードができます。
これで実行するとthis.splitContainer1.Panel2MinSize = 200;の場所で例外が発生してしまいます。
実際の結果
デザインファイルの「Panel2MinSize」プロパティを設定するところで
「SplitterDistance は Panel1MinSize と幅 Panel2MinSize の間でなければなりません。」という、例外。
期待した結果
例外が発生しないでフォームが表示される。
File Attachments
0 attachments
Sign in to post a comment.
Posted by Azulean on 1/30/2009 at 6:15 AM
フォームのサイズは実行環境に依存すると思いますので、具体的な値を上げてはいかがでしょうか。
Sizeプロパティの数値とか、Designer.csの一部切り出しとか。

Microsoftの再現担当者が再現できなかった場合は受理されませんので、なるべく情報を掲載しましょう。
Posted by Microsoft on 2/2/2009 at 9:39 PM
フィードバックをお送りいただきまして、ありがとうございます。いただいた報告内容に基づき、現在問題を調査中です。しばらくお待ちください。

Visual Studio Product Team

Problem Description:
Setting “Panel2MinSize” property in “SplitContainer” causes an error at runtime.My environment is VS2008 SP1 Japanese edition, and Windows XP SP3.
In Design view, place a “SplitContainer” on the form and set the “Panel2MinSize” property, and then an error occurs.
I think the cause may be that I set the “Panel2MinSize” property before the “Size” property.

Repro Steps
1. Place a SplitContainer on the form.
2. Set the “Panel2MinSize” to the half size of the form.
3. Set the width of the form to quarter.
4. Debug.

For example, set the form size to 640, 480, and place a SplitContainer on it.
Then set the Panel2MinSize property of the SplitContainer to 200.
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 24);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.treeView1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.listView1);
this.splitContainer1.Panel2MinSize = 200;
this.splitContainer1.Size = new System.Drawing.Size(392, 242);
this.splitContainer1.TabIndex = 1;
The above code is generated in the file
Then debug, and an exception occurs at
this.splitContainer1.Panel2MinSize = 200;

Actual Results:
An exception “SplitterDistance must be between Panel1MinSize and Width Panel2MinSize.” occurs in the place of “Panel2MinSize” property setting.

Expected Results:
No exception occurs, and the form is displayed.



Posted by Microsoft on 2/3/2009 at 2:26 AM
Thanks for your feedback. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Posted by Microsoft on 2/3/2009 at 8:02 PM

フィードバックありがとうございます。こちらの件は該当する機能の担当チームにエスカレーションいたしました。今後はそのチーム内でこのバグを次のリリースでフィックスするかどうかを検討いたします。

よろしくお願いします。
Visual Studio Product Team
Posted by Jitta on 11/8/2009 at 6:14 AM
重複 duplicates
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=115466
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=93991

この問題は、Visual Studio 2005 beta から、報告され続けています。Visual Studio 2010 beta 2 にも、存在しています。
this issue has been reported at visual studio 2005 beta. and still remain in visual studio 2010 beta 2.