本文整理汇总了C#中System.Windows.Forms.RowStyle类的典型用法代码示例。如果您正苦于以下问题:C# RowStyle类的具体用法?C# RowStyle怎么用?C# RowStyle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RowStyle类属于System.Windows.Forms命名空间,在下文中一共展示了RowStyle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CtorTest3
public void CtorTest3 ()
{
RowStyle rs = new RowStyle (SizeType.Absolute, 5.0f);
Assert.AreEqual (5.0, rs.Height, "1");
Assert.AreEqual (SizeType.Absolute, rs.SizeType, "2");
}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:RowStyleTest.cs
示例2: addTableRow
private int addTableRow()
{
int index = tlpProperties.RowCount++;
RowStyle style = new RowStyle(SizeType.AutoSize);
tlpProperties.RowStyles.Add(style);
return index;
}
开发者ID:TMA-AQ,项目名称:AlgoQuest,代码行数:7,代码来源:FrmIniProperties.cs
示例3: SetTableStyle
private void SetTableStyle()
{
// 行スタイル
for (; table.RowCount != table.RowStyles.Count;)
{
if (table.RowCount < table.RowStyles.Count)
{
this.table.RowStyles.RemoveAt(this.table.RowStyles.Count - 1);
}
else
{
var rowStyle = new RowStyle(SizeType.Percent, (float)100.0 / table.RowCount);
this.table.RowStyles.Add(rowStyle);
}
}
// 列スタイル
for (; table.ColumnCount != table.ColumnStyles.Count;)
{
if (table.ColumnCount < table.ColumnStyles.Count)
{
this.table.ColumnStyles.RemoveAt(this.table.ColumnStyles.Count - 1);
}
else
{
var colStyle = new ColumnStyle(SizeType.Percent, (float)100.0 / table.ColumnCount);
this.table.ColumnStyles.Add(colStyle);
}
}
}
开发者ID:manbou404,项目名称:CSharpLab,代码行数:30,代码来源:RadioGroup3.cs
示例4: AddControl
/// <summary>
///
/// </summary>
/// <param name="c"></param>
public void AddControl(Control c)
{
this.tableLayoutPanel1.RowCount += 1;
this.tableLayoutPanel1.Controls.Add(c, 0, this.tableLayoutPanel1.RowCount - 1);
RowStyle style = new RowStyle(SizeType.Absolute, c.Height);
this.tableLayoutPanel1.RowStyles.Add(style);
}
开发者ID:hkiaipc,项目名称:C3,代码行数:11,代码来源:UCGroupUI.cs
示例5: tableMain_SizeChanged
private void tableMain_SizeChanged(object sender, EventArgs e)
{
ColumnStyle columnLeft = new ColumnStyle(SizeType.Absolute, 200);
ColumnStyle columnRight = new ColumnStyle(SizeType.Absolute, 220);
ColumnStyle columnFill = new ColumnStyle(SizeType.Percent, 100);
RowStyle rowTop = new RowStyle(SizeType.Absolute, 145);
RowStyle rowBottom = new RowStyle(SizeType.Absolute, 256);
RowStyle rowFill = new RowStyle(SizeType.Percent, 100);
tableMain.SuspendLayout();
if (tableMain.Width > columnLeft.Width + columnRight.Width)
{
tableMain.ColumnStyles[0] = columnFill;
tableMain.ColumnStyles[1] = columnRight;
}
else
{
tableMain.ColumnStyles[0] = columnLeft;
tableMain.ColumnStyles[1] = columnFill;
}
if (tableMain.Height > rowTop.Height + rowBottom.Height)
{
tableMain.RowStyles[0] = rowFill;
tableMain.RowStyles[1] = rowBottom;
}
else
{
tableMain.RowStyles[0] = rowTop;
tableMain.RowStyles[1] = rowFill;
}
tableMain.ResumeLayout();
}
开发者ID:jozefizso,项目名称:StyleCopPlus,代码行数:35,代码来源:CustomRulesPage.cs
示例6: InitOnce
public void InitOnce(TableLayoutPanel grid, ViewModel viewModel)
{
_Grid = grid;
_Style = new RowStyle(SizeType.Absolute, 27F);
Dock = DockStyle.Fill;
_Label = new Label();
_Label.TextAlign = ContentAlignment.MiddleRight;
_Label.Dock = DockStyle.Fill;
TbData.GotFocus += new EventHandler(TbData_GotFocus);
BtView.Image = viewModel.GetImage("att-file-preview");
_Body.ShowTips(BtView, "查看文件");
BtOpen.Image = viewModel.GetImage("att-file-append");
_Body.ShowTips(BtOpen, "添加文件");
//BtFill.Image = viewModel.GetImage("att-copy");
//_Body.ShowTips(BtFill, "复制");
BtCopy.Image = viewModel.GetImage("script-fill-16");
_Body.ShowTips(BtCopy, "填充");
InitSpec(TbData);
}
开发者ID:burstas,项目名称:rmps,代码行数:25,代码来源:UcFileAtt.cs
示例7: AddTableRow
private int AddTableRow()
{
int result = docFileTablePanel.RowCount++;
RowStyle style = new RowStyle(SizeType.Absolute, ROWSIZE);
docFileTablePanel.RowStyles.Add(style);
return result;
}
开发者ID:Papafox,项目名称:MobiEPUB,代码行数:7,代码来源:MainForm.cs
示例8: addAudio
public void addAudio(int id, int pos)
{
if (pos > 15)
{
this.Invoke((MethodInvoker)delegate()
{
this.audioTable.RowCount++;
RowStyle style = new RowStyle(SizeType.AutoSize);
this.audioTable.RowStyles.Add(style);
});
}
Label num, artist, title, dur;
num = new Label();
num.Text=Convert.ToString(pos);
num.Anchor = (AnchorStyles.Left);
title = new Label();
title.Text=this.audio.audio[id].title;
title.Anchor = (AnchorStyles.Left);
artist = new Label();
artist.Text = this.audio.audio[id].artist;
artist.Anchor = (AnchorStyles.Left);
dur = new Label();
string temp = Convert.ToString(this.audio.audio[id].duration % 60);
if ((this.audio.audio[id].duration % 60) < 10)
temp = "0" + temp;
dur.Text=Convert.ToString(this.audio.audio[id].duration/60)+":"+temp;
dur.Anchor = (AnchorStyles.Left);
dur.TextAlign = ContentAlignment.MiddleLeft;
artist.TextAlign = ContentAlignment.MiddleLeft;
title.TextAlign = ContentAlignment.MiddleLeft;
num.TextAlign = ContentAlignment.MiddleLeft;
//dur.AutoSize = true;
//artist.AutoSize = true; //подгоняем
//title.AutoSize = true;
//num.AutoSize = true;
dur.Width = 40;
artist.Width = 150; //обрезаем
title.Width = 190;
num.Width = 30;
dur.Click += new System.EventHandler(this.audio_Click);
artist.Click += new System.EventHandler(this.audio_Click);
title.Click += new System.EventHandler(this.audio_Click);
num.Click += new System.EventHandler(this.audio_Click);
this.Invoke((MethodInvoker)delegate()
{
this.audioTable.Controls.Add(num, 0, pos);
this.audioTable.Controls.Add(title, 1, pos);
this.audioTable.Controls.Add(artist, 2, pos);
this.audioTable.Controls.Add(dur, 3, pos);
});
}
开发者ID:Vnv192,项目名称:vk_music,代码行数:59,代码来源:MainWindow.cs
示例9: AddTableRow
private int AddTableRow(TableLayoutPanel tlp)
{
tlp.RowStyles.Clear();
int index = tlp.RowCount++;
RowStyle style = new RowStyle(SizeType.AutoSize);
tlp.RowStyles.Add(style);
return index;
}
开发者ID:ayodele1,项目名称:B2BTrainingApplication,代码行数:8,代码来源:AnswerDisplayForm.cs
示例10: AddLayoutRow
private void AddLayoutRow( int pixels )
{
RowStyle rs = new RowStyle(SizeType.Absolute);
rs.Height = pixels;
tableLayoutPanel.RowCount++;
tableLayoutPanel.RowStyles.Add(rs);
tableLayoutPanel.Controls.Add( new Label() , 0, tableLayoutPanel.RowCount); // need a control or else the tablelayoutpanel won't work correctly
}
开发者ID:rlv-dan,项目名称:DynForm,代码行数:9,代码来源:DynForm.cs
示例11: FormCompass
public FormCompass( FormMain parent )
{
InitializeComponent();
MainFontColor = Color.FromArgb( 0x00, 0x00, 0x00 );
SubFontColor = Color.FromArgb( 0x88, 0x88, 0x88 );
ControlHelper.SetDoubleBuffered( BasePanel );
ControlHelper.SetDoubleBuffered( TableEnemyFleet );
ControlHelper.SetDoubleBuffered( TableEnemyMember );
TableEnemyMember.SuspendLayout();
ControlMembers = new TableEnemyMemberControl[6];
for ( int i = 0; i < ControlMembers.Length; i++ ) {
ControlMembers[i] = new TableEnemyMemberControl( this, TableEnemyMember, i );
}
TableEnemyMember.ResumeLayout();
TableEnemyCandidate.SuspendLayout();
ControlCandidates = new TableEnemyCandidateControl[6];
for ( int i = 0; i < ControlCandidates.Length; i++ ) {
ControlCandidates[i] = new TableEnemyCandidateControl( this, TableEnemyCandidate, i );
}
//row/column style init
for ( int y = 0; y < TableEnemyCandidate.RowCount; y++ ) {
var rs = new RowStyle( SizeType.AutoSize );
if ( TableEnemyCandidate.RowStyles.Count <= y )
TableEnemyCandidate.RowStyles.Add( rs );
else
TableEnemyCandidate.RowStyles[y] = rs;
}
for ( int x = 0; x < TableEnemyCandidate.ColumnCount; x++ ) {
var cs = new ColumnStyle( SizeType.AutoSize );
if ( TableEnemyCandidate.ColumnStyles.Count <= x )
TableEnemyCandidate.ColumnStyles.Add( cs );
else
TableEnemyCandidate.ColumnStyles[x] = cs;
}
TableEnemyCandidate.ResumeLayout();
//BasePanel.SetFlowBreak( TextMapArea, true );
BasePanel.SetFlowBreak( TextDestination, true );
//BasePanel.SetFlowBreak( TextEventKind, true );
BasePanel.SetFlowBreak( TextEventDetail, true );
TextDestination.ImageList = ResourceManager.Instance.Equipments;
TextEventKind.ImageList = ResourceManager.Instance.Equipments;
TextEventDetail.ImageList = ResourceManager.Instance.Equipments;
TextFormation.ImageList = ResourceManager.Instance.Icons;
TextAirSuperiority.ImageList = ResourceManager.Instance.Equipments;
TextAirSuperiority.ImageIndex = (int)ResourceManager.EquipmentContent.CarrierBasedFighter;
ConfigurationChanged();
Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormCompass] );
}
开发者ID:reynomagnus,项目名称:ElectronicObserver,代码行数:56,代码来源:FormCompass.cs
示例12: AddCheckBoxs
/// <summary>
/// Adds checkbox to panel
/// </summary>
/// <param name="panel">Panel</param>
public void AddCheckBoxs(TableLayoutPanel panel)
{
var questions = inferenceModule.Questions;
var checkBoxs = questions.Select(question => new ThreeStateCheckBox(question.Id, question.Content)).ToArray();
foreach (ThreeStateCheckBox checkBox in checkBoxs)
{
RowStyle style = new RowStyle(SizeType.Absolute, 25);
panel.RowStyles.Add(style);
int index = panel.RowCount;
panel.Controls.Add(checkBox, 0, index);
panel.RowCount++;
}
}
开发者ID:marcinfoder,项目名称:SystemEkspercki,代码行数:18,代码来源:Presenter.cs
示例13: AddToTable
public void AddToTable( TableLayoutPanel table, int row ) {
table.Controls.Add( ShipName, 0, row );
table.Controls.Add( Equipments, 1, row );
#region set RowStyle
RowStyle rs = new RowStyle( SizeType.Absolute, 21 );
if ( table.RowStyles.Count > row )
table.RowStyles[row] = rs;
else
while ( table.RowStyles.Count <= row )
table.RowStyles.Add( rs );
#endregion
}
开发者ID:silfumus,项目名称:ElectronicObserver,代码行数:15,代码来源:FormCompass.cs
示例14: InitOnce
public void InitOnce(TableLayoutPanel grid, ViewModel viewModel)
{
_Grid = grid;
_Style = new RowStyle(SizeType.Absolute, 60F);
Dock = DockStyle.Fill;
_Label = new Label();
_Label.TextAlign = ContentAlignment.MiddleRight;
_Label.Dock = DockStyle.Fill;
TbData.GotFocus += new EventHandler(TbData_GotFocus);
InitSpec(TbData);
}
开发者ID:burstas,项目名称:rmps,代码行数:15,代码来源:UcMemoAtt.cs
示例15: AddToTable
public void AddToTable( TableLayoutPanel table, int row ) {
table.Controls.Add( Number, 0, row );
table.Controls.Add( State, 1, row );
#region set RowStyle
RowStyle rs = new RowStyle( SizeType.AutoSize, 0 );
if ( table.RowStyles.Count > row )
table.RowStyles[row] = rs;
else
while ( table.RowStyles.Count <= row )
table.RowStyles.Add( rs );
#endregion
}
开发者ID:silfumus,项目名称:ElectronicObserver,代码行数:16,代码来源:FormFleetOverview.cs
示例16: LoginControl
public LoginControl()
{
lblHostname.Text = "Hostname";
lblHostport.Text = "Port";
lblUsername.Text = "Username";
lblPassword.Text = "Password";
btnConnectDisconnect.Text = "Connect";
txtHostname.Text = "meridian103.meridian59.com";
txtHostport.Maximum = UInt16.MaxValue;
txtHostport.Value = 5903;
txtPassword.PasswordChar = Convert.ToChar("*");
lblHostname.Width = lblUsername.Width = lblPassword.Width = lblHostport.Width = 60;
lblHostname.AutoSize = lblUsername.AutoSize = lblPassword.AutoSize = lblHostport.AutoSize = false;
lblHostname.TextAlign = lblUsername.TextAlign = lblPassword.TextAlign = lblHostport.TextAlign = ContentAlignment.MiddleLeft;
txtHostname.Width = txtUsername.Width = txtPassword.Width = txtHostport.Width = btnConnectDisconnect.Width = 140;
txtHostname.Height = txtUsername.Height = txtPassword.Height = txtHostport.Height = btnConnectDisconnect.Height = 25;
tblMain.RowCount = 4;
tblMain.ColumnCount = 2;
tblMain.Controls.Add(lblUsername, 0, 0);
tblMain.Controls.Add(txtUsername, 1, 0);
tblMain.Controls.Add(lblPassword, 0, 1);
tblMain.Controls.Add(txtPassword, 1, 1);
tblMain.Controls.Add(lblHostname, 0, 2);
tblMain.Controls.Add(txtHostname, 1, 2);
tblMain.Controls.Add(lblHostport, 0, 3);
tblMain.Controls.Add(txtHostport, 1, 3);
tblMain.Controls.Add(btnConnectDisconnect, 1, 4);
tblMain.Dock = DockStyle.Fill;
tblMain.Padding = new Padding(2);
RowStyle defaultRowStyle;
for (int i = 0; i < tblMain.RowCount; i++)
{
defaultRowStyle = new RowStyle(SizeType.Absolute, 25);
tblMain.RowStyles.Add(defaultRowStyle);
}
btnConnectDisconnect.Click += new EventHandler(btnConnectDisconnect_Click);
this.Controls.Add(tblMain);
}
开发者ID:AlgorithmsOfMathdestruction,项目名称:meridian59-dotnet,代码行数:47,代码来源:LoginControl.cs
示例17: Init
public override void Init(CarFormEx carform)
{
base.Init(carform);
GroupBox box = new GroupBox {
Text = "参数设置",
Dock = DockStyle.Fill
};
carform.pnlContainer.Controls.Add(box);
TableLayoutPanel tb = new TableLayoutPanel {
Dock = DockStyle.Fill,
RowCount = 1,
ColumnCount = 2
};
tb.RowStyles.Clear();
tb.ColumnStyles.Clear();
tb.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
for (int i = 0; i < 1; i++)
{
RowStyle rowStyle = new RowStyle {
Height = 25f,
SizeType = SizeType.Absolute
};
ColumnStyle columnStyle = new ColumnStyle {
Width = 113f,
SizeType = SizeType.Absolute
};
tb.RowStyles.Add(rowStyle);
tb.ColumnStyles.Add(columnStyle);
}
Label con = new Label {
Text = "通道类型:",
TextAlign = ContentAlignment.MiddleRight,
Dock = DockStyle.Fill
};
this.SetControl(tb, con, 0, 0);
StarNetTextBox box2 = new StarNetTextBox {
Name = "txtip",
MaxLength = 100,
Width = 160,
Dock = DockStyle.Left,
DestinationMarshalByRefObject = this.cmd,
PropertyName = "RepeatTimes",
PropertyType = System.Type.GetType("System.Int32")
};
this.SetControl(tb, box2, 0, 1);
box.Controls.Add(tb);
}
开发者ID:lexzh,项目名称:Myproject,代码行数:47,代码来源:testcmd.cs
示例18: FormFleetOverview
public FormFleetOverview( FormMain parent )
{
InitializeComponent();
ConfigurationChanged();
ControlHelper.SetDoubleBuffered( TableFleet );
ControlFleet = new List<TableFleetControl>( 4 );
for ( int i = 0; i < 4; i++ ) {
ControlFleet.Add( new TableFleetControl( this, i + 1, TableFleet ) );
}
#region CombinedTag
{
CombinedTag = new ImageLabel();
CombinedTag.Anchor = AnchorStyles.Left;
CombinedTag.Font = Utility.Configuration.Config.UI.MainFont;
CombinedTag.Margin = new Padding( 3, 2, 3, 2 );
CombinedTag.ImageList = ResourceManager.Instance.Icons;
CombinedTag.ImageIndex = (int)ResourceManager.IconContent.FleetCombined;
CombinedTag.Text = "-";
CombinedTag.Visible = false;
TableFleet.Controls.Add( CombinedTag, 1, 4 );
#region set RowStyle
RowStyle rs = new RowStyle( SizeType.AutoSize, 0 );
if ( TableFleet.RowStyles.Count > 4 )
TableFleet.RowStyles[4] = rs;
else
while ( TableFleet.RowStyles.Count <= 4 )
TableFleet.RowStyles.Add( rs );
#endregion
}
#endregion
Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormFleet] );
Utility.SystemEvents.UpdateTimerTick += UpdateTimerTick;
}
开发者ID:RyoLee,项目名称:ElectronicObserver,代码行数:43,代码来源:FormFleetOverview.cs
示例19: InitOnce
public void InitOnce(TableLayoutPanel grid, ViewModel viewModel)
{
_Grid = grid;
_Style = new RowStyle(SizeType.Absolute, 27F);
Dock = DockStyle.Fill;
_Label = new Label();
_Label.TextAlign = ContentAlignment.MiddleRight;
_Label.Dock = DockStyle.Fill;
TbData.GotFocus += new EventHandler(TbData_GotFocus);
BtFill.Image = viewModel.GetImage("att-data-options");
_Body.ShowTips(BtFill, "选项");
BtCopy.Image = viewModel.GetImage("att-copy");
_Body.ShowTips(BtCopy, "复制");
BtFill.Image = viewModel.GetImage("script-fill-16");
_Body.ShowTips(BtFill, "填充");
}
开发者ID:burstas,项目名称:rmps,代码行数:20,代码来源:AttData.cs
示例20: InitOnce
public void InitOnce(TableLayoutPanel grid, ViewModel viewModel)
{
_Grid = grid;
_ViewModel = viewModel;
_Style = new RowStyle(SizeType.Absolute, 27F);
Dock = DockStyle.Fill;
_Label = new Label();
_Label.TextAlign = ContentAlignment.MiddleRight;
_Label.Dock = DockStyle.Fill;
TbData.GotFocus += new EventHandler(TbData_GotFocus);
BtMod.Image = viewModel.GetImage(TbData.UseSystemPasswordChar ? "att-pass-hide" : "att-pass-show");
_Body.ShowTips(BtMod, TbData.UseSystemPasswordChar ? "显示口令" : "隐藏口令");
BtCopy.Image = viewModel.GetImage("att-copy");
_Body.ShowTips(BtCopy, "复制");
BtFill.Image = viewModel.GetImage("script-fill-16");
_Body.ShowTips(BtFill, "填充");
}
开发者ID:burstas,项目名称:rmps,代码行数:21,代码来源:AttPass.cs
注:本文中的System.Windows.Forms.RowStyle类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论