當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.RowStyle類代碼示例

本文整理匯總了C#中System.Windows.Forms.RowStyle的典型用法代碼示例。如果您正苦於以下問題:C# RowStyle類的具體用法?C# RowStyle怎麽用?C# RowStyle使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RowStyle類屬於System.Windows.Forms命名空間,在下文中一共展示了RowStyle類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的System.Windows.Forms.RowStyle類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。