当前位置: 首页>>代码示例>>C#>>正文


C# TextBox.PerformLayout方法代码示例

本文整理汇总了C#中System.Windows.Forms.TextBox.PerformLayout方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.PerformLayout方法的具体用法?C# TextBox.PerformLayout怎么用?C# TextBox.PerformLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.TextBox的用法示例。


在下文中一共展示了TextBox.PerformLayout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: helpButton_Click

        private void helpButton_Click(object sender, EventArgs e)
        {
            Form legend = new Form();
            legend.Icon = BIDSHelper.Resources.Common.BIDSHelper;
            legend.Text = "Measure Group Health Check: Legend";
            legend.MaximizeBox = false;
            legend.MinimizeBox = false;

            TextBox text = new TextBox();
            text.Location = new System.Drawing.Point(2, 2);
            text.Size = new System.Drawing.Size(500, 380);
            text.Multiline = true;
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("Columns:");
            sb.AppendLine("Measure - The measure name");
            sb.AppendLine("Aggregate - The aggregate function for that measure");
            sb.AppendLine("Total - The aggregated value across all rows");
            sb.AppendLine("Min - The minimum value from a single row");
            sb.AppendLine("Max - The maximum value from a single row");
            sb.AppendLine("Decimals? - Are there any values that have decimals? More than 4 decimals?");
            sb.AppendLine("DSV - The datatype for the column in the data source view");
            sb.AppendLine("Current - The current measure datatype");
            sb.AppendLine("New - The recommended new measure datatype");
            sb.AppendLine();
            sb.AppendLine("Datatypes:");
            foreach (MeasureGroupHealthCheckPlugin.MeasureDataTypeOption dataType in MeasureGroupHealthCheckPlugin.dataTypeOptions)
            {
                sb.Append(dataType.dataType.ToString()).Append("/").Append(dataType.type.Name);
                sb.Append(" (").Append(dataType.displayMin).Append(" to ").Append(dataType.displayMax).Append(") ").AppendLine(dataType.limitations);
            }
            text.Text = sb.ToString();
            text.ReadOnly = true;
            text.Select(0, 0);
            text.BorderStyle = BorderStyle.None;
            text.PerformLayout();

            legend.Controls.Add(text);
            legend.Width = text.Width + 4;
            legend.Height = text.Height + 4;
            legend.MinimumSize = legend.Size;
            legend.MaximumSize = legend.Size;
            legend.SizeGripStyle = SizeGripStyle.Hide;
            legend.ShowInTaskbar = false;
            legend.StartPosition = FormStartPosition.CenterParent;
            legend.FormBorderStyle = FormBorderStyle.Fixed3D;
            legend.PerformLayout();
            legend.ShowDialog();
            legend.Dispose();
        }
开发者ID:japj,项目名称:bidshelper,代码行数:49,代码来源:MeasureGroupHealthCheckForm.cs


注:本文中的System.Windows.Forms.TextBox.PerformLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。