├── .gitignore ├── Build └── CBComponents.HeaderTableLayoutPanel.zip ├── Examples ├── Examples.csproj ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── Form2.Designer.cs ├── Form2.cs ├── Form2.resx ├── Program.cs ├── Properties │ └── AssemblyInfo.cs └── app.config ├── HeaderTableLayoutPanel.sln ├── LICENSE ├── Media ├── img_01.png ├── img_02.png ├── img_03.png └── img_04.png ├── README.md └── Source ├── HeaderTableLayoutPanel.cs ├── HeaderTableLayoutPanel.csproj ├── HeaderTableLayoutPanel.nuspec └── Properties └── AssemblyInfo.cs /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | *.VC.VC.opendb 85 | 86 | # Visual Studio profiler 87 | *.psess 88 | *.vsp 89 | *.vspx 90 | *.sap 91 | 92 | # TFS 2012 Local Workspace 93 | $tf/ 94 | 95 | # Guidance Automation Toolkit 96 | *.gpState 97 | 98 | # ReSharper is a .NET coding add-in 99 | _ReSharper*/ 100 | *.[Rr]e[Ss]harper 101 | *.DotSettings.user 102 | 103 | # JustCode is a .NET coding add-in 104 | .JustCode 105 | 106 | # TeamCity is a build add-in 107 | _TeamCity* 108 | 109 | # DotCover is a Code Coverage Tool 110 | *.dotCover 111 | 112 | # NCrunch 113 | _NCrunch_* 114 | .*crunch*.local.xml 115 | nCrunchTemp_* 116 | 117 | # MightyMoose 118 | *.mm.* 119 | AutoTest.Net/ 120 | 121 | # Web workbench (sass) 122 | .sass-cache/ 123 | 124 | # Installshield output folder 125 | [Ee]xpress/ 126 | 127 | # DocProject is a documentation generator add-in 128 | DocProject/buildhelp/ 129 | DocProject/Help/*.HxT 130 | DocProject/Help/*.HxC 131 | DocProject/Help/*.hhc 132 | DocProject/Help/*.hhk 133 | DocProject/Help/*.hhp 134 | DocProject/Help/Html2 135 | DocProject/Help/html 136 | 137 | # Click-Once directory 138 | publish/ 139 | 140 | # Publish Web Output 141 | *.[Pp]ublish.xml 142 | *.azurePubxml 143 | # TODO: Comment the next line if you want to checkin your web deploy settings 144 | # but database connection strings (with potential passwords) will be unencrypted 145 | *.pubxml 146 | *.publishproj 147 | 148 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 149 | # checkin your Azure Web App publish settings, but sensitive information contained 150 | # in these scripts will be unencrypted 151 | PublishScripts/ 152 | 153 | # NuGet Packages 154 | *.nupkg 155 | # The packages folder can be ignored because of Package Restore 156 | **/packages/* 157 | # except build/, which is used as an MSBuild target. 158 | !**/packages/build/ 159 | # Uncomment if necessary however generally it will be regenerated when needed 160 | #!**/packages/repositories.config 161 | # NuGet v3's project.json files produces more ignoreable files 162 | *.nuget.props 163 | *.nuget.targets 164 | 165 | # Microsoft Azure Build Output 166 | csx/ 167 | *.build.csdef 168 | 169 | # Microsoft Azure Emulator 170 | ecf/ 171 | rcf/ 172 | 173 | # Windows Store app package directories and files 174 | AppPackages/ 175 | BundleArtifacts/ 176 | Package.StoreAssociation.xml 177 | _pkginfo.txt 178 | 179 | # Visual Studio cache files 180 | # files ending in .cache can be ignored 181 | *.[Cc]ache 182 | # but keep track of directories ending in .cache 183 | !*.[Cc]ache/ 184 | 185 | # Others 186 | ClientBin/ 187 | ~$* 188 | *~ 189 | *.dbmdl 190 | *.dbproj.schemaview 191 | *.pfx 192 | *.publishsettings 193 | node_modules/ 194 | orleans.codegen.cs 195 | 196 | # Since there are multiple workflows, uncomment next line to ignore bower_components 197 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 198 | #bower_components/ 199 | 200 | # RIA/Silverlight projects 201 | Generated_Code/ 202 | 203 | # Backup & report files from converting an old project file 204 | # to a newer Visual Studio version. Backup files are not needed, 205 | # because we have git ;-) 206 | _UpgradeReport_Files/ 207 | Backup*/ 208 | UpgradeLog*.XML 209 | UpgradeLog*.htm 210 | 211 | # SQL Server files 212 | *.mdf 213 | *.ldf 214 | 215 | # Business Intelligence projects 216 | *.rdl.data 217 | *.bim.layout 218 | *.bim_*.settings 219 | 220 | # Microsoft Fakes 221 | FakesAssemblies/ 222 | 223 | # GhostDoc plugin setting file 224 | *.GhostDoc.xml 225 | 226 | # Node.js Tools for Visual Studio 227 | .ntvs_analysis.dat 228 | 229 | # Visual Studio 6 build log 230 | *.plg 231 | 232 | # Visual Studio 6 workspace options file 233 | *.opt 234 | 235 | # Visual Studio LightSwitch build output 236 | **/*.HTMLClient/GeneratedArtifacts 237 | **/*.DesktopClient/GeneratedArtifacts 238 | **/*.DesktopClient/ModelManifest.xml 239 | **/*.Server/GeneratedArtifacts 240 | **/*.Server/ModelManifest.xml 241 | _Pvt_Extensions 242 | 243 | # Paket dependency manager 244 | .paket/paket.exe 245 | paket-files/ 246 | 247 | # FAKE - F# Make 248 | .fake/ 249 | 250 | # JetBrains Rider 251 | .idea/ 252 | *.sln.iml 253 | -------------------------------------------------------------------------------- /Build/CBComponents.HeaderTableLayoutPanel.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datarza/HeaderTableLayoutPanel/336881ab5b775ff7fedca552ef9d044df1fb954c/Build/CBComponents.HeaderTableLayoutPanel.zip -------------------------------------------------------------------------------- /Examples/Examples.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F694E984-DD7B-44AE-81A9-585625248DB9} 8 | WinExe 9 | Properties 10 | Examples 11 | Examples 12 | v3.5 13 | 512 14 | 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | Form 43 | 44 | 45 | Form1.cs 46 | 47 | 48 | Form 49 | 50 | 51 | Form2.cs 52 | 53 | 54 | 55 | 56 | Form1.cs 57 | 58 | 59 | Form2.cs 60 | 61 | 62 | 63 | 64 | {9823a7ef-3ba9-4b90-9f40-6e9806161b8a} 65 | HeaderTableLayoutPanel 66 | 67 | 68 | 69 | 70 | 71 | 72 | 79 | -------------------------------------------------------------------------------- /Examples/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Examples 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); 32 | this.headerTableLayoutPanel1 = new CBComponents.HeaderTableLayoutPanel(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.textBox1 = new System.Windows.Forms.TextBox(); 35 | this.label2 = new System.Windows.Forms.Label(); 36 | this.comboBox1 = new System.Windows.Forms.ComboBox(); 37 | this.headerTableLayoutPanel2 = new CBComponents.HeaderTableLayoutPanel(); 38 | this.label3 = new System.Windows.Forms.Label(); 39 | this.textBox2 = new System.Windows.Forms.TextBox(); 40 | this.label4 = new System.Windows.Forms.Label(); 41 | this.comboBox2 = new System.Windows.Forms.ComboBox(); 42 | this.headerTableLayoutPanel3 = new CBComponents.HeaderTableLayoutPanel(); 43 | this.label9 = new System.Windows.Forms.Label(); 44 | this.textBox5 = new System.Windows.Forms.TextBox(); 45 | this.label10 = new System.Windows.Forms.Label(); 46 | this.comboBox5 = new System.Windows.Forms.ComboBox(); 47 | this.headerTableLayoutPanel4 = new CBComponents.HeaderTableLayoutPanel(); 48 | this.label5 = new System.Windows.Forms.Label(); 49 | this.textBox3 = new System.Windows.Forms.TextBox(); 50 | this.label6 = new System.Windows.Forms.Label(); 51 | this.comboBox3 = new System.Windows.Forms.ComboBox(); 52 | this.headerTableLayoutPanel5 = new CBComponents.HeaderTableLayoutPanel(); 53 | this.label7 = new System.Windows.Forms.Label(); 54 | this.textBox4 = new System.Windows.Forms.TextBox(); 55 | this.label8 = new System.Windows.Forms.Label(); 56 | this.comboBox4 = new System.Windows.Forms.ComboBox(); 57 | this.headerTableLayoutPanel6 = new CBComponents.HeaderTableLayoutPanel(); 58 | this.label11 = new System.Windows.Forms.Label(); 59 | this.textBox6 = new System.Windows.Forms.TextBox(); 60 | this.label12 = new System.Windows.Forms.Label(); 61 | this.comboBox6 = new System.Windows.Forms.ComboBox(); 62 | this.flowLayoutPanel1.SuspendLayout(); 63 | this.headerTableLayoutPanel1.SuspendLayout(); 64 | this.headerTableLayoutPanel2.SuspendLayout(); 65 | this.headerTableLayoutPanel3.SuspendLayout(); 66 | this.headerTableLayoutPanel4.SuspendLayout(); 67 | this.headerTableLayoutPanel5.SuspendLayout(); 68 | this.headerTableLayoutPanel6.SuspendLayout(); 69 | this.SuspendLayout(); 70 | // 71 | // flowLayoutPanel1 72 | // 73 | this.flowLayoutPanel1.AutoSize = true; 74 | this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 75 | this.flowLayoutPanel1.Controls.Add(this.headerTableLayoutPanel1); 76 | this.flowLayoutPanel1.Controls.Add(this.headerTableLayoutPanel2); 77 | this.flowLayoutPanel1.Controls.Add(this.headerTableLayoutPanel3); 78 | this.flowLayoutPanel1.Controls.Add(this.headerTableLayoutPanel4); 79 | this.flowLayoutPanel1.Controls.Add(this.headerTableLayoutPanel5); 80 | this.flowLayoutPanel1.Controls.Add(this.headerTableLayoutPanel6); 81 | this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; 82 | this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); 83 | this.flowLayoutPanel1.Name = "flowLayoutPanel1"; 84 | this.flowLayoutPanel1.Size = new System.Drawing.Size(486, 226); 85 | this.flowLayoutPanel1.TabIndex = 3; 86 | // 87 | // headerTableLayoutPanel1 88 | // 89 | this.headerTableLayoutPanel1.AutoSize = true; 90 | this.headerTableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 91 | this.headerTableLayoutPanel1.CaptionText = "ForeColor"; 92 | this.headerTableLayoutPanel1.ColumnCount = 2; 93 | this.headerTableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 94 | this.headerTableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 95 | this.headerTableLayoutPanel1.Controls.Add(this.label1, 0, 0); 96 | this.headerTableLayoutPanel1.Controls.Add(this.textBox1, 1, 0); 97 | this.headerTableLayoutPanel1.Controls.Add(this.label2, 0, 1); 98 | this.headerTableLayoutPanel1.Controls.Add(this.comboBox1, 1, 1); 99 | this.headerTableLayoutPanel1.Location = new System.Drawing.Point(3, 3); 100 | this.headerTableLayoutPanel1.Name = "headerTableLayoutPanel1"; 101 | this.headerTableLayoutPanel1.RowCount = 2; 102 | this.headerTableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 103 | this.headerTableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 104 | this.headerTableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 105 | this.headerTableLayoutPanel1.Size = new System.Drawing.Size(237, 70); 106 | this.headerTableLayoutPanel1.TabIndex = 0; 107 | // 108 | // label1 109 | // 110 | this.label1.Anchor = System.Windows.Forms.AnchorStyles.Right; 111 | this.label1.AutoSize = true; 112 | this.label1.Location = new System.Drawing.Point(3, 23); 113 | this.label1.MinimumSize = new System.Drawing.Size(100, 0); 114 | this.label1.Name = "label1"; 115 | this.label1.Size = new System.Drawing.Size(100, 13); 116 | this.label1.TabIndex = 0; 117 | this.label1.Text = "Main filed:"; 118 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 119 | // 120 | // textBox1 121 | // 122 | this.textBox1.Anchor = System.Windows.Forms.AnchorStyles.Left; 123 | this.textBox1.Location = new System.Drawing.Point(109, 20); 124 | this.textBox1.Name = "textBox1"; 125 | this.textBox1.Size = new System.Drawing.Size(125, 20); 126 | this.textBox1.TabIndex = 2; 127 | // 128 | // label2 129 | // 130 | this.label2.Anchor = System.Windows.Forms.AnchorStyles.Right; 131 | this.label2.AutoSize = true; 132 | this.label2.Location = new System.Drawing.Point(3, 50); 133 | this.label2.MinimumSize = new System.Drawing.Size(100, 0); 134 | this.label2.Name = "label2"; 135 | this.label2.Size = new System.Drawing.Size(100, 13); 136 | this.label2.TabIndex = 1; 137 | this.label2.Text = "Secondary field:"; 138 | this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 139 | // 140 | // comboBox1 141 | // 142 | this.comboBox1.Anchor = System.Windows.Forms.AnchorStyles.Left; 143 | this.comboBox1.FormattingEnabled = true; 144 | this.comboBox1.Location = new System.Drawing.Point(109, 46); 145 | this.comboBox1.Name = "comboBox1"; 146 | this.comboBox1.Size = new System.Drawing.Size(125, 21); 147 | this.comboBox1.TabIndex = 3; 148 | // 149 | // headerTableLayoutPanel2 150 | // 151 | this.headerTableLayoutPanel2.AutoSize = true; 152 | this.headerTableLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 153 | this.headerTableLayoutPanel2.CaptionStyle = CBComponents.HeaderTableLayoutPanel.HighlightCaptionStyle.HighlightColor; 154 | this.headerTableLayoutPanel2.CaptionText = "HighlightColor"; 155 | this.headerTableLayoutPanel2.ColumnCount = 2; 156 | this.headerTableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 157 | this.headerTableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 158 | this.headerTableLayoutPanel2.Controls.Add(this.label3, 0, 0); 159 | this.headerTableLayoutPanel2.Controls.Add(this.textBox2, 1, 0); 160 | this.headerTableLayoutPanel2.Controls.Add(this.label4, 0, 1); 161 | this.headerTableLayoutPanel2.Controls.Add(this.comboBox2, 1, 1); 162 | this.headerTableLayoutPanel2.Location = new System.Drawing.Point(3, 79); 163 | this.headerTableLayoutPanel2.Name = "headerTableLayoutPanel2"; 164 | this.headerTableLayoutPanel2.RowCount = 2; 165 | this.headerTableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); 166 | this.headerTableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); 167 | this.headerTableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 168 | this.headerTableLayoutPanel2.Size = new System.Drawing.Size(237, 70); 169 | this.headerTableLayoutPanel2.TabIndex = 1; 170 | // 171 | // label3 172 | // 173 | this.label3.Anchor = System.Windows.Forms.AnchorStyles.Right; 174 | this.label3.AutoSize = true; 175 | this.label3.Location = new System.Drawing.Point(3, 23); 176 | this.label3.MinimumSize = new System.Drawing.Size(100, 0); 177 | this.label3.Name = "label3"; 178 | this.label3.Size = new System.Drawing.Size(100, 13); 179 | this.label3.TabIndex = 0; 180 | this.label3.Text = "Main filed:"; 181 | this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 182 | // 183 | // textBox2 184 | // 185 | this.textBox2.Anchor = System.Windows.Forms.AnchorStyles.Left; 186 | this.textBox2.Location = new System.Drawing.Point(109, 20); 187 | this.textBox2.Name = "textBox2"; 188 | this.textBox2.Size = new System.Drawing.Size(125, 20); 189 | this.textBox2.TabIndex = 2; 190 | // 191 | // label4 192 | // 193 | this.label4.Anchor = System.Windows.Forms.AnchorStyles.Right; 194 | this.label4.AutoSize = true; 195 | this.label4.Location = new System.Drawing.Point(3, 50); 196 | this.label4.MinimumSize = new System.Drawing.Size(100, 0); 197 | this.label4.Name = "label4"; 198 | this.label4.Size = new System.Drawing.Size(100, 13); 199 | this.label4.TabIndex = 1; 200 | this.label4.Text = "Secondary field:"; 201 | this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 202 | // 203 | // comboBox2 204 | // 205 | this.comboBox2.Anchor = System.Windows.Forms.AnchorStyles.Left; 206 | this.comboBox2.FormattingEnabled = true; 207 | this.comboBox2.Location = new System.Drawing.Point(109, 46); 208 | this.comboBox2.Name = "comboBox2"; 209 | this.comboBox2.Size = new System.Drawing.Size(125, 21); 210 | this.comboBox2.TabIndex = 3; 211 | // 212 | // headerTableLayoutPanel3 213 | // 214 | this.headerTableLayoutPanel3.AutoSize = true; 215 | this.headerTableLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 216 | this.headerTableLayoutPanel3.CaptionStyle = CBComponents.HeaderTableLayoutPanel.HighlightCaptionStyle.NavisionAxaptaStyle; 217 | this.headerTableLayoutPanel3.CaptionText = "NavisionAxaptaStyle"; 218 | this.headerTableLayoutPanel3.ColumnCount = 2; 219 | this.headerTableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 220 | this.headerTableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 221 | this.headerTableLayoutPanel3.Controls.Add(this.label9, 0, 0); 222 | this.headerTableLayoutPanel3.Controls.Add(this.textBox5, 1, 0); 223 | this.headerTableLayoutPanel3.Controls.Add(this.label10, 0, 1); 224 | this.headerTableLayoutPanel3.Controls.Add(this.comboBox5, 1, 1); 225 | this.flowLayoutPanel1.SetFlowBreak(this.headerTableLayoutPanel3, true); 226 | this.headerTableLayoutPanel3.Location = new System.Drawing.Point(3, 155); 227 | this.headerTableLayoutPanel3.Name = "headerTableLayoutPanel3"; 228 | this.headerTableLayoutPanel3.RowCount = 2; 229 | this.headerTableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); 230 | this.headerTableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); 231 | this.headerTableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 232 | this.headerTableLayoutPanel3.Size = new System.Drawing.Size(237, 67); 233 | this.headerTableLayoutPanel3.TabIndex = 2; 234 | // 235 | // label9 236 | // 237 | this.label9.Anchor = System.Windows.Forms.AnchorStyles.Right; 238 | this.label9.AutoSize = true; 239 | this.label9.Location = new System.Drawing.Point(3, 20); 240 | this.label9.MinimumSize = new System.Drawing.Size(100, 0); 241 | this.label9.Name = "label9"; 242 | this.label9.Size = new System.Drawing.Size(100, 13); 243 | this.label9.TabIndex = 0; 244 | this.label9.Text = "Main filed:"; 245 | this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 246 | // 247 | // textBox5 248 | // 249 | this.textBox5.Anchor = System.Windows.Forms.AnchorStyles.Left; 250 | this.textBox5.Location = new System.Drawing.Point(109, 17); 251 | this.textBox5.Name = "textBox5"; 252 | this.textBox5.Size = new System.Drawing.Size(125, 20); 253 | this.textBox5.TabIndex = 2; 254 | // 255 | // label10 256 | // 257 | this.label10.Anchor = System.Windows.Forms.AnchorStyles.Right; 258 | this.label10.AutoSize = true; 259 | this.label10.Location = new System.Drawing.Point(3, 47); 260 | this.label10.MinimumSize = new System.Drawing.Size(100, 0); 261 | this.label10.Name = "label10"; 262 | this.label10.Size = new System.Drawing.Size(100, 13); 263 | this.label10.TabIndex = 1; 264 | this.label10.Text = "Secondary field:"; 265 | this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 266 | // 267 | // comboBox5 268 | // 269 | this.comboBox5.Anchor = System.Windows.Forms.AnchorStyles.Left; 270 | this.comboBox5.FormattingEnabled = true; 271 | this.comboBox5.Location = new System.Drawing.Point(109, 43); 272 | this.comboBox5.Name = "comboBox5"; 273 | this.comboBox5.Size = new System.Drawing.Size(125, 21); 274 | this.comboBox5.TabIndex = 3; 275 | // 276 | // headerTableLayoutPanel4 277 | // 278 | this.headerTableLayoutPanel4.AutoSize = true; 279 | this.headerTableLayoutPanel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 280 | this.headerTableLayoutPanel4.CaptionStyle = CBComponents.HeaderTableLayoutPanel.HighlightCaptionStyle.ForeStyle; 281 | this.headerTableLayoutPanel4.CaptionText = "ForeStyle"; 282 | this.headerTableLayoutPanel4.ColumnCount = 2; 283 | this.headerTableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 284 | this.headerTableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 285 | this.headerTableLayoutPanel4.Controls.Add(this.label5, 0, 0); 286 | this.headerTableLayoutPanel4.Controls.Add(this.textBox3, 1, 0); 287 | this.headerTableLayoutPanel4.Controls.Add(this.label6, 0, 1); 288 | this.headerTableLayoutPanel4.Controls.Add(this.comboBox3, 1, 1); 289 | this.headerTableLayoutPanel4.Location = new System.Drawing.Point(246, 3); 290 | this.headerTableLayoutPanel4.Name = "headerTableLayoutPanel4"; 291 | this.headerTableLayoutPanel4.RowCount = 2; 292 | this.headerTableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); 293 | this.headerTableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); 294 | this.headerTableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 295 | this.headerTableLayoutPanel4.Size = new System.Drawing.Size(237, 71); 296 | this.headerTableLayoutPanel4.TabIndex = 3; 297 | // 298 | // label5 299 | // 300 | this.label5.Anchor = System.Windows.Forms.AnchorStyles.Right; 301 | this.label5.AutoSize = true; 302 | this.label5.Location = new System.Drawing.Point(3, 24); 303 | this.label5.MinimumSize = new System.Drawing.Size(100, 0); 304 | this.label5.Name = "label5"; 305 | this.label5.Size = new System.Drawing.Size(100, 13); 306 | this.label5.TabIndex = 0; 307 | this.label5.Text = "Main filed:"; 308 | this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 309 | // 310 | // textBox3 311 | // 312 | this.textBox3.Anchor = System.Windows.Forms.AnchorStyles.Left; 313 | this.textBox3.Location = new System.Drawing.Point(109, 21); 314 | this.textBox3.Name = "textBox3"; 315 | this.textBox3.Size = new System.Drawing.Size(125, 20); 316 | this.textBox3.TabIndex = 2; 317 | // 318 | // label6 319 | // 320 | this.label6.Anchor = System.Windows.Forms.AnchorStyles.Right; 321 | this.label6.AutoSize = true; 322 | this.label6.Location = new System.Drawing.Point(3, 51); 323 | this.label6.MinimumSize = new System.Drawing.Size(100, 0); 324 | this.label6.Name = "label6"; 325 | this.label6.Size = new System.Drawing.Size(100, 13); 326 | this.label6.TabIndex = 1; 327 | this.label6.Text = "Secondary field:"; 328 | this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 329 | // 330 | // comboBox3 331 | // 332 | this.comboBox3.Anchor = System.Windows.Forms.AnchorStyles.Left; 333 | this.comboBox3.FormattingEnabled = true; 334 | this.comboBox3.Location = new System.Drawing.Point(109, 47); 335 | this.comboBox3.Name = "comboBox3"; 336 | this.comboBox3.Size = new System.Drawing.Size(125, 21); 337 | this.comboBox3.TabIndex = 3; 338 | // 339 | // headerTableLayoutPanel5 340 | // 341 | this.headerTableLayoutPanel5.AutoSize = true; 342 | this.headerTableLayoutPanel5.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 343 | this.headerTableLayoutPanel5.CaptionStyle = CBComponents.HeaderTableLayoutPanel.HighlightCaptionStyle.HighlightStyle; 344 | this.headerTableLayoutPanel5.CaptionText = "HighlightStyle"; 345 | this.headerTableLayoutPanel5.ColumnCount = 2; 346 | this.headerTableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 347 | this.headerTableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 348 | this.headerTableLayoutPanel5.Controls.Add(this.label7, 0, 0); 349 | this.headerTableLayoutPanel5.Controls.Add(this.textBox4, 1, 0); 350 | this.headerTableLayoutPanel5.Controls.Add(this.label8, 0, 1); 351 | this.headerTableLayoutPanel5.Controls.Add(this.comboBox4, 1, 1); 352 | this.headerTableLayoutPanel5.Location = new System.Drawing.Point(246, 80); 353 | this.headerTableLayoutPanel5.Name = "headerTableLayoutPanel5"; 354 | this.headerTableLayoutPanel5.RowCount = 2; 355 | this.headerTableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle()); 356 | this.headerTableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle()); 357 | this.headerTableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 358 | this.headerTableLayoutPanel5.Size = new System.Drawing.Size(237, 71); 359 | this.headerTableLayoutPanel5.TabIndex = 4; 360 | // 361 | // label7 362 | // 363 | this.label7.Anchor = System.Windows.Forms.AnchorStyles.Right; 364 | this.label7.AutoSize = true; 365 | this.label7.Location = new System.Drawing.Point(3, 24); 366 | this.label7.MinimumSize = new System.Drawing.Size(100, 0); 367 | this.label7.Name = "label7"; 368 | this.label7.Size = new System.Drawing.Size(100, 13); 369 | this.label7.TabIndex = 0; 370 | this.label7.Text = "Main filed:"; 371 | this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 372 | // 373 | // textBox4 374 | // 375 | this.textBox4.Anchor = System.Windows.Forms.AnchorStyles.Left; 376 | this.textBox4.Location = new System.Drawing.Point(109, 21); 377 | this.textBox4.Name = "textBox4"; 378 | this.textBox4.Size = new System.Drawing.Size(125, 20); 379 | this.textBox4.TabIndex = 2; 380 | // 381 | // label8 382 | // 383 | this.label8.Anchor = System.Windows.Forms.AnchorStyles.Right; 384 | this.label8.AutoSize = true; 385 | this.label8.Location = new System.Drawing.Point(3, 51); 386 | this.label8.MinimumSize = new System.Drawing.Size(100, 0); 387 | this.label8.Name = "label8"; 388 | this.label8.Size = new System.Drawing.Size(100, 13); 389 | this.label8.TabIndex = 1; 390 | this.label8.Text = "Secondary field:"; 391 | this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 392 | // 393 | // comboBox4 394 | // 395 | this.comboBox4.Anchor = System.Windows.Forms.AnchorStyles.Left; 396 | this.comboBox4.FormattingEnabled = true; 397 | this.comboBox4.Location = new System.Drawing.Point(109, 47); 398 | this.comboBox4.Name = "comboBox4"; 399 | this.comboBox4.Size = new System.Drawing.Size(125, 21); 400 | this.comboBox4.TabIndex = 3; 401 | // 402 | // headerTableLayoutPanel6 403 | // 404 | this.headerTableLayoutPanel6.AutoSize = true; 405 | this.headerTableLayoutPanel6.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 406 | this.headerTableLayoutPanel6.CaptionStyle = CBComponents.HeaderTableLayoutPanel.HighlightCaptionStyle.GroupBoxStyle; 407 | this.headerTableLayoutPanel6.CaptionText = "GroupBoxStyle"; 408 | this.headerTableLayoutPanel6.ColumnCount = 2; 409 | this.headerTableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 410 | this.headerTableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 411 | this.headerTableLayoutPanel6.Controls.Add(this.label11, 0, 0); 412 | this.headerTableLayoutPanel6.Controls.Add(this.textBox6, 1, 0); 413 | this.headerTableLayoutPanel6.Controls.Add(this.label12, 0, 1); 414 | this.headerTableLayoutPanel6.Controls.Add(this.comboBox6, 1, 1); 415 | this.headerTableLayoutPanel6.Location = new System.Drawing.Point(246, 157); 416 | this.headerTableLayoutPanel6.Name = "headerTableLayoutPanel6"; 417 | this.headerTableLayoutPanel6.RowCount = 2; 418 | this.headerTableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle()); 419 | this.headerTableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle()); 420 | this.headerTableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 421 | this.headerTableLayoutPanel6.Size = new System.Drawing.Size(237, 66); 422 | this.headerTableLayoutPanel6.TabIndex = 5; 423 | // 424 | // label11 425 | // 426 | this.label11.Anchor = System.Windows.Forms.AnchorStyles.Right; 427 | this.label11.AutoSize = true; 428 | this.label11.Location = new System.Drawing.Point(3, 19); 429 | this.label11.MinimumSize = new System.Drawing.Size(100, 0); 430 | this.label11.Name = "label11"; 431 | this.label11.Size = new System.Drawing.Size(100, 13); 432 | this.label11.TabIndex = 0; 433 | this.label11.Text = "Main filed:"; 434 | this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 435 | // 436 | // textBox6 437 | // 438 | this.textBox6.Anchor = System.Windows.Forms.AnchorStyles.Left; 439 | this.textBox6.Location = new System.Drawing.Point(109, 16); 440 | this.textBox6.Name = "textBox6"; 441 | this.textBox6.Size = new System.Drawing.Size(125, 20); 442 | this.textBox6.TabIndex = 2; 443 | // 444 | // label12 445 | // 446 | this.label12.Anchor = System.Windows.Forms.AnchorStyles.Right; 447 | this.label12.AutoSize = true; 448 | this.label12.Location = new System.Drawing.Point(3, 46); 449 | this.label12.MinimumSize = new System.Drawing.Size(100, 0); 450 | this.label12.Name = "label12"; 451 | this.label12.Size = new System.Drawing.Size(100, 13); 452 | this.label12.TabIndex = 1; 453 | this.label12.Text = "Secondary field:"; 454 | this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 455 | // 456 | // comboBox6 457 | // 458 | this.comboBox6.Anchor = System.Windows.Forms.AnchorStyles.Left; 459 | this.comboBox6.FormattingEnabled = true; 460 | this.comboBox6.Location = new System.Drawing.Point(109, 42); 461 | this.comboBox6.Name = "comboBox6"; 462 | this.comboBox6.Size = new System.Drawing.Size(125, 21); 463 | this.comboBox6.TabIndex = 3; 464 | // 465 | // Form1 466 | // 467 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 468 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 469 | this.AutoSize = true; 470 | this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 471 | this.ClientSize = new System.Drawing.Size(624, 442); 472 | this.Controls.Add(this.flowLayoutPanel1); 473 | this.Name = "Form1"; 474 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 475 | this.Text = "Form1"; 476 | this.Load += new System.EventHandler(this.Form1_Load); 477 | this.flowLayoutPanel1.ResumeLayout(false); 478 | this.flowLayoutPanel1.PerformLayout(); 479 | this.headerTableLayoutPanel1.ResumeLayout(false); 480 | this.headerTableLayoutPanel1.PerformLayout(); 481 | this.headerTableLayoutPanel2.ResumeLayout(false); 482 | this.headerTableLayoutPanel2.PerformLayout(); 483 | this.headerTableLayoutPanel3.ResumeLayout(false); 484 | this.headerTableLayoutPanel3.PerformLayout(); 485 | this.headerTableLayoutPanel4.ResumeLayout(false); 486 | this.headerTableLayoutPanel4.PerformLayout(); 487 | this.headerTableLayoutPanel5.ResumeLayout(false); 488 | this.headerTableLayoutPanel5.PerformLayout(); 489 | this.headerTableLayoutPanel6.ResumeLayout(false); 490 | this.headerTableLayoutPanel6.PerformLayout(); 491 | this.ResumeLayout(false); 492 | this.PerformLayout(); 493 | 494 | } 495 | 496 | #endregion 497 | 498 | private CBComponents.HeaderTableLayoutPanel headerTableLayoutPanel1; 499 | private System.Windows.Forms.Label label1; 500 | private System.Windows.Forms.Label label2; 501 | private System.Windows.Forms.TextBox textBox1; 502 | private System.Windows.Forms.ComboBox comboBox1; 503 | private CBComponents.HeaderTableLayoutPanel headerTableLayoutPanel2; 504 | private System.Windows.Forms.Label label3; 505 | private System.Windows.Forms.TextBox textBox2; 506 | private System.Windows.Forms.Label label4; 507 | private System.Windows.Forms.ComboBox comboBox2; 508 | private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; 509 | private CBComponents.HeaderTableLayoutPanel headerTableLayoutPanel5; 510 | private System.Windows.Forms.Label label7; 511 | private System.Windows.Forms.TextBox textBox4; 512 | private System.Windows.Forms.Label label8; 513 | private System.Windows.Forms.ComboBox comboBox4; 514 | private CBComponents.HeaderTableLayoutPanel headerTableLayoutPanel4; 515 | private System.Windows.Forms.Label label5; 516 | private System.Windows.Forms.TextBox textBox3; 517 | private System.Windows.Forms.Label label6; 518 | private System.Windows.Forms.ComboBox comboBox3; 519 | private CBComponents.HeaderTableLayoutPanel headerTableLayoutPanel3; 520 | private System.Windows.Forms.Label label9; 521 | private System.Windows.Forms.TextBox textBox5; 522 | private System.Windows.Forms.Label label10; 523 | private System.Windows.Forms.ComboBox comboBox5; 524 | private CBComponents.HeaderTableLayoutPanel headerTableLayoutPanel6; 525 | private System.Windows.Forms.Label label11; 526 | private System.Windows.Forms.TextBox textBox6; 527 | private System.Windows.Forms.Label label12; 528 | private System.Windows.Forms.ComboBox comboBox6; 529 | } 530 | } 531 | 532 | -------------------------------------------------------------------------------- /Examples/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.Windows.Forms; 4 | 5 | namespace Examples 6 | { 7 | public partial class Form1 : Form 8 | { 9 | public Form1() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void Form1_Load(object sender, EventArgs e) 15 | { 16 | // Showing second form nearby this form 17 | this.SetDesktopLocation(this.Width / 2, this.DesktopLocation.Y / 2); 18 | var _frm2 = new Form2(); 19 | _frm2.Show(); 20 | Point location = this.DesktopLocation; 21 | location.Offset(this.DesktopBounds.Size.Width + 2, 0); 22 | _frm2.SetDesktopLocation(location.X, location.Y); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Examples/Form1.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Examples/Form2.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Examples 2 | { 3 | partial class Form2 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); 32 | this.headerTableLayoutPanel1 = new CBComponents.HeaderTableLayoutPanel(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.label3 = new System.Windows.Forms.Label(); 36 | this.textBox1 = new System.Windows.Forms.TextBox(); 37 | this.textBox2 = new System.Windows.Forms.TextBox(); 38 | this.textBox3 = new System.Windows.Forms.TextBox(); 39 | this.headerTableLayoutPanel2 = new CBComponents.HeaderTableLayoutPanel(); 40 | this.label4 = new System.Windows.Forms.Label(); 41 | this.label5 = new System.Windows.Forms.Label(); 42 | this.label_6 = new System.Windows.Forms.Label(); 43 | this.textBox4 = new System.Windows.Forms.TextBox(); 44 | this.textBox5 = new System.Windows.Forms.TextBox(); 45 | this.textBox6 = new System.Windows.Forms.TextBox(); 46 | this.headerTableLayoutPanel3 = new CBComponents.HeaderTableLayoutPanel(); 47 | this.label7 = new System.Windows.Forms.Label(); 48 | this.label8 = new System.Windows.Forms.Label(); 49 | this.label9 = new System.Windows.Forms.Label(); 50 | this.label10 = new System.Windows.Forms.Label(); 51 | this.label11 = new System.Windows.Forms.Label(); 52 | this.comboBox1 = new System.Windows.Forms.ComboBox(); 53 | this.comboBox2 = new System.Windows.Forms.ComboBox(); 54 | this.comboBox3 = new System.Windows.Forms.ComboBox(); 55 | this.textBox7 = new System.Windows.Forms.TextBox(); 56 | this.textBox8 = new System.Windows.Forms.TextBox(); 57 | this.headerTableLayoutPanel4 = new CBComponents.HeaderTableLayoutPanel(); 58 | this.label12 = new System.Windows.Forms.Label(); 59 | this.label13 = new System.Windows.Forms.Label(); 60 | this.textBox9 = new System.Windows.Forms.TextBox(); 61 | this.textBox10 = new System.Windows.Forms.TextBox(); 62 | this.toolStrip1 = new System.Windows.Forms.ToolStrip(); 63 | this.toolStrip2 = new System.Windows.Forms.ToolStrip(); 64 | this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); 65 | this.toolStripTextBox1 = new System.Windows.Forms.ToolStripTextBox(); 66 | this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel(); 67 | this.toolStripComboBox1 = new System.Windows.Forms.ToolStripComboBox(); 68 | this.flowLayoutPanel1.SuspendLayout(); 69 | this.headerTableLayoutPanel1.SuspendLayout(); 70 | this.headerTableLayoutPanel2.SuspendLayout(); 71 | this.headerTableLayoutPanel3.SuspendLayout(); 72 | this.headerTableLayoutPanel4.SuspendLayout(); 73 | this.toolStrip2.SuspendLayout(); 74 | this.SuspendLayout(); 75 | // 76 | // flowLayoutPanel1 77 | // 78 | this.flowLayoutPanel1.AutoSize = true; 79 | this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 80 | this.flowLayoutPanel1.Controls.Add(this.headerTableLayoutPanel1); 81 | this.flowLayoutPanel1.Controls.Add(this.headerTableLayoutPanel2); 82 | this.flowLayoutPanel1.Controls.Add(this.headerTableLayoutPanel3); 83 | this.flowLayoutPanel1.Controls.Add(this.headerTableLayoutPanel4); 84 | this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; 85 | this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; 86 | this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 50); 87 | this.flowLayoutPanel1.Name = "flowLayoutPanel1"; 88 | this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(8); 89 | this.flowLayoutPanel1.Size = new System.Drawing.Size(624, 392); 90 | this.flowLayoutPanel1.TabIndex = 4; 91 | // 92 | // headerTableLayoutPanel1 93 | // 94 | this.headerTableLayoutPanel1.AutoSize = true; 95 | this.headerTableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 96 | this.headerTableLayoutPanel1.CaptionText = "Personal"; 97 | this.headerTableLayoutPanel1.ColumnCount = 2; 98 | this.headerTableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 99 | this.headerTableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 100 | this.headerTableLayoutPanel1.Controls.Add(this.label1, 0, 0); 101 | this.headerTableLayoutPanel1.Controls.Add(this.label2, 0, 1); 102 | this.headerTableLayoutPanel1.Controls.Add(this.label3, 0, 2); 103 | this.headerTableLayoutPanel1.Controls.Add(this.textBox1, 1, 0); 104 | this.headerTableLayoutPanel1.Controls.Add(this.textBox2, 1, 1); 105 | this.headerTableLayoutPanel1.Controls.Add(this.textBox3, 1, 2); 106 | this.headerTableLayoutPanel1.Location = new System.Drawing.Point(11, 11); 107 | this.headerTableLayoutPanel1.Name = "headerTableLayoutPanel1"; 108 | this.headerTableLayoutPanel1.Padding = new System.Windows.Forms.Padding(2); 109 | this.headerTableLayoutPanel1.RowCount = 3; 110 | this.headerTableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 111 | this.headerTableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 112 | this.headerTableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 113 | this.headerTableLayoutPanel1.Size = new System.Drawing.Size(241, 99); 114 | this.headerTableLayoutPanel1.TabIndex = 0; 115 | // 116 | // label1 117 | // 118 | this.label1.Anchor = System.Windows.Forms.AnchorStyles.Right; 119 | this.label1.AutoSize = true; 120 | this.label1.Location = new System.Drawing.Point(5, 25); 121 | this.label1.MinimumSize = new System.Drawing.Size(100, 0); 122 | this.label1.Name = "label1"; 123 | this.label1.Size = new System.Drawing.Size(100, 13); 124 | this.label1.TabIndex = 0; 125 | this.label1.Text = "First Name:"; 126 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 127 | // 128 | // label2 129 | // 130 | this.label2.Anchor = System.Windows.Forms.AnchorStyles.Right; 131 | this.label2.AutoSize = true; 132 | this.label2.Location = new System.Drawing.Point(5, 51); 133 | this.label2.MinimumSize = new System.Drawing.Size(100, 0); 134 | this.label2.Name = "label2"; 135 | this.label2.Size = new System.Drawing.Size(100, 13); 136 | this.label2.TabIndex = 4; 137 | this.label2.Text = "Last Name:"; 138 | this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 139 | // 140 | // label3 141 | // 142 | this.label3.Anchor = System.Windows.Forms.AnchorStyles.Right; 143 | this.label3.AutoSize = true; 144 | this.label3.Location = new System.Drawing.Point(5, 77); 145 | this.label3.MinimumSize = new System.Drawing.Size(100, 0); 146 | this.label3.Name = "label3"; 147 | this.label3.Size = new System.Drawing.Size(100, 13); 148 | this.label3.TabIndex = 1; 149 | this.label3.Text = "Middle Name:"; 150 | this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 151 | // 152 | // textBox1 153 | // 154 | this.textBox1.Anchor = System.Windows.Forms.AnchorStyles.Left; 155 | this.textBox1.Location = new System.Drawing.Point(111, 22); 156 | this.textBox1.Name = "textBox1"; 157 | this.textBox1.Size = new System.Drawing.Size(125, 20); 158 | this.textBox1.TabIndex = 2; 159 | this.textBox1.Text = "Radu"; 160 | // 161 | // textBox2 162 | // 163 | this.textBox2.Anchor = System.Windows.Forms.AnchorStyles.Left; 164 | this.textBox2.Location = new System.Drawing.Point(111, 48); 165 | this.textBox2.Name = "textBox2"; 166 | this.textBox2.Size = new System.Drawing.Size(125, 20); 167 | this.textBox2.TabIndex = 3; 168 | this.textBox2.Text = "Martin"; 169 | // 170 | // textBox3 171 | // 172 | this.textBox3.Anchor = System.Windows.Forms.AnchorStyles.Left; 173 | this.textBox3.Location = new System.Drawing.Point(111, 74); 174 | this.textBox3.Name = "textBox3"; 175 | this.textBox3.Size = new System.Drawing.Size(125, 20); 176 | this.textBox3.TabIndex = 5; 177 | // 178 | // headerTableLayoutPanel2 179 | // 180 | this.headerTableLayoutPanel2.AutoSize = true; 181 | this.headerTableLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 182 | this.headerTableLayoutPanel2.CaptionText = "Contacts"; 183 | this.headerTableLayoutPanel2.ColumnCount = 2; 184 | this.headerTableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 185 | this.headerTableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 186 | this.headerTableLayoutPanel2.Controls.Add(this.label4, 0, 0); 187 | this.headerTableLayoutPanel2.Controls.Add(this.label5, 0, 1); 188 | this.headerTableLayoutPanel2.Controls.Add(this.label_6, 0, 2); 189 | this.headerTableLayoutPanel2.Controls.Add(this.textBox4, 1, 0); 190 | this.headerTableLayoutPanel2.Controls.Add(this.textBox5, 1, 1); 191 | this.headerTableLayoutPanel2.Controls.Add(this.textBox6, 1, 2); 192 | this.flowLayoutPanel1.SetFlowBreak(this.headerTableLayoutPanel2, true); 193 | this.headerTableLayoutPanel2.Location = new System.Drawing.Point(11, 116); 194 | this.headerTableLayoutPanel2.Name = "headerTableLayoutPanel2"; 195 | this.headerTableLayoutPanel2.Padding = new System.Windows.Forms.Padding(2); 196 | this.headerTableLayoutPanel2.RowCount = 3; 197 | this.headerTableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); 198 | this.headerTableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); 199 | this.headerTableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); 200 | this.headerTableLayoutPanel2.Size = new System.Drawing.Size(241, 99); 201 | this.headerTableLayoutPanel2.TabIndex = 2; 202 | // 203 | // label4 204 | // 205 | this.label4.Anchor = System.Windows.Forms.AnchorStyles.Right; 206 | this.label4.AutoSize = true; 207 | this.label4.Location = new System.Drawing.Point(5, 25); 208 | this.label4.MinimumSize = new System.Drawing.Size(100, 0); 209 | this.label4.Name = "label4"; 210 | this.label4.Size = new System.Drawing.Size(100, 13); 211 | this.label4.TabIndex = 0; 212 | this.label4.Text = "Phone:"; 213 | this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 214 | // 215 | // label5 216 | // 217 | this.label5.Anchor = System.Windows.Forms.AnchorStyles.Right; 218 | this.label5.AutoSize = true; 219 | this.label5.Location = new System.Drawing.Point(5, 51); 220 | this.label5.MinimumSize = new System.Drawing.Size(100, 0); 221 | this.label5.Name = "label5"; 222 | this.label5.Size = new System.Drawing.Size(100, 13); 223 | this.label5.TabIndex = 1; 224 | this.label5.Text = "Cell:"; 225 | this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 226 | // 227 | // label_6 228 | // 229 | this.label_6.Anchor = System.Windows.Forms.AnchorStyles.Right; 230 | this.label_6.AutoSize = true; 231 | this.label_6.Location = new System.Drawing.Point(5, 77); 232 | this.label_6.MinimumSize = new System.Drawing.Size(100, 0); 233 | this.label_6.Name = "label_6"; 234 | this.label_6.Size = new System.Drawing.Size(100, 13); 235 | this.label_6.TabIndex = 4; 236 | this.label_6.Text = "Email:"; 237 | this.label_6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 238 | // 239 | // textBox4 240 | // 241 | this.textBox4.Anchor = System.Windows.Forms.AnchorStyles.Left; 242 | this.textBox4.Location = new System.Drawing.Point(111, 22); 243 | this.textBox4.Name = "textBox4"; 244 | this.textBox4.Size = new System.Drawing.Size(125, 20); 245 | this.textBox4.TabIndex = 2; 246 | // 247 | // textBox5 248 | // 249 | this.textBox5.Anchor = System.Windows.Forms.AnchorStyles.Left; 250 | this.textBox5.Location = new System.Drawing.Point(111, 48); 251 | this.textBox5.Name = "textBox5"; 252 | this.textBox5.Size = new System.Drawing.Size(125, 20); 253 | this.textBox5.TabIndex = 3; 254 | // 255 | // textBox6 256 | // 257 | this.textBox6.Anchor = System.Windows.Forms.AnchorStyles.Left; 258 | this.textBox6.Location = new System.Drawing.Point(111, 74); 259 | this.textBox6.Name = "textBox6"; 260 | this.textBox6.Size = new System.Drawing.Size(125, 20); 261 | this.textBox6.TabIndex = 5; 262 | // 263 | // headerTableLayoutPanel3 264 | // 265 | this.headerTableLayoutPanel3.AutoSize = true; 266 | this.headerTableLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 267 | this.headerTableLayoutPanel3.CaptionText = "Address"; 268 | this.headerTableLayoutPanel3.ColumnCount = 2; 269 | this.headerTableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 270 | this.headerTableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 271 | this.headerTableLayoutPanel3.Controls.Add(this.label7, 0, 0); 272 | this.headerTableLayoutPanel3.Controls.Add(this.label8, 0, 1); 273 | this.headerTableLayoutPanel3.Controls.Add(this.label9, 0, 2); 274 | this.headerTableLayoutPanel3.Controls.Add(this.label10, 0, 3); 275 | this.headerTableLayoutPanel3.Controls.Add(this.label11, 0, 4); 276 | this.headerTableLayoutPanel3.Controls.Add(this.comboBox1, 1, 0); 277 | this.headerTableLayoutPanel3.Controls.Add(this.comboBox2, 1, 1); 278 | this.headerTableLayoutPanel3.Controls.Add(this.comboBox3, 1, 2); 279 | this.headerTableLayoutPanel3.Controls.Add(this.textBox7, 1, 3); 280 | this.headerTableLayoutPanel3.Controls.Add(this.textBox8, 1, 4); 281 | this.headerTableLayoutPanel3.Location = new System.Drawing.Point(258, 11); 282 | this.headerTableLayoutPanel3.Name = "headerTableLayoutPanel3"; 283 | this.headerTableLayoutPanel3.Padding = new System.Windows.Forms.Padding(2); 284 | this.headerTableLayoutPanel3.RowCount = 5; 285 | this.headerTableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); 286 | this.headerTableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); 287 | this.headerTableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); 288 | this.headerTableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); 289 | this.headerTableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); 290 | this.headerTableLayoutPanel3.Size = new System.Drawing.Size(291, 154); 291 | this.headerTableLayoutPanel3.TabIndex = 4; 292 | // 293 | // label7 294 | // 295 | this.label7.Anchor = System.Windows.Forms.AnchorStyles.Right; 296 | this.label7.AutoSize = true; 297 | this.label7.Location = new System.Drawing.Point(5, 26); 298 | this.label7.MinimumSize = new System.Drawing.Size(100, 0); 299 | this.label7.Name = "label7"; 300 | this.label7.Size = new System.Drawing.Size(100, 13); 301 | this.label7.TabIndex = 0; 302 | this.label7.Text = "Country:"; 303 | this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 304 | // 305 | // label8 306 | // 307 | this.label8.Anchor = System.Windows.Forms.AnchorStyles.Right; 308 | this.label8.AutoSize = true; 309 | this.label8.Location = new System.Drawing.Point(5, 53); 310 | this.label8.MinimumSize = new System.Drawing.Size(100, 0); 311 | this.label8.Name = "label8"; 312 | this.label8.Size = new System.Drawing.Size(100, 13); 313 | this.label8.TabIndex = 1; 314 | this.label8.Text = "Province:"; 315 | this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 316 | // 317 | // label9 318 | // 319 | this.label9.Anchor = System.Windows.Forms.AnchorStyles.Right; 320 | this.label9.AutoSize = true; 321 | this.label9.Location = new System.Drawing.Point(5, 80); 322 | this.label9.MinimumSize = new System.Drawing.Size(100, 0); 323 | this.label9.Name = "label9"; 324 | this.label9.Size = new System.Drawing.Size(100, 13); 325 | this.label9.TabIndex = 4; 326 | this.label9.Text = "City:"; 327 | this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 328 | // 329 | // label10 330 | // 331 | this.label10.Anchor = System.Windows.Forms.AnchorStyles.Right; 332 | this.label10.AutoSize = true; 333 | this.label10.Location = new System.Drawing.Point(5, 106); 334 | this.label10.MinimumSize = new System.Drawing.Size(100, 0); 335 | this.label10.Name = "label10"; 336 | this.label10.Size = new System.Drawing.Size(100, 13); 337 | this.label10.TabIndex = 7; 338 | this.label10.Text = "Street:"; 339 | this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 340 | // 341 | // label11 342 | // 343 | this.label11.Anchor = System.Windows.Forms.AnchorStyles.Right; 344 | this.label11.AutoSize = true; 345 | this.label11.Location = new System.Drawing.Point(5, 132); 346 | this.label11.MinimumSize = new System.Drawing.Size(100, 0); 347 | this.label11.Name = "label11"; 348 | this.label11.Size = new System.Drawing.Size(100, 13); 349 | this.label11.TabIndex = 9; 350 | this.label11.Text = "Zip:"; 351 | this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 352 | // 353 | // comboBox1 354 | // 355 | this.comboBox1.Anchor = System.Windows.Forms.AnchorStyles.Left; 356 | this.comboBox1.FormattingEnabled = true; 357 | this.comboBox1.Location = new System.Drawing.Point(111, 22); 358 | this.comboBox1.Name = "comboBox1"; 359 | this.comboBox1.Size = new System.Drawing.Size(125, 21); 360 | this.comboBox1.TabIndex = 6; 361 | this.comboBox1.Text = "Canada"; 362 | // 363 | // comboBox2 364 | // 365 | this.comboBox2.Anchor = System.Windows.Forms.AnchorStyles.Left; 366 | this.comboBox2.FormattingEnabled = true; 367 | this.comboBox2.Location = new System.Drawing.Point(111, 49); 368 | this.comboBox2.Name = "comboBox2"; 369 | this.comboBox2.Size = new System.Drawing.Size(125, 21); 370 | this.comboBox2.TabIndex = 3; 371 | this.comboBox2.Text = "Ontario"; 372 | // 373 | // comboBox3 374 | // 375 | this.comboBox3.Anchor = System.Windows.Forms.AnchorStyles.Left; 376 | this.comboBox3.FormattingEnabled = true; 377 | this.comboBox3.Location = new System.Drawing.Point(111, 76); 378 | this.comboBox3.Name = "comboBox3"; 379 | this.comboBox3.Size = new System.Drawing.Size(125, 21); 380 | this.comboBox3.TabIndex = 5; 381 | this.comboBox3.Text = "Toronto"; 382 | // 383 | // textBox7 384 | // 385 | this.textBox7.Anchor = System.Windows.Forms.AnchorStyles.Left; 386 | this.textBox7.Location = new System.Drawing.Point(111, 103); 387 | this.textBox7.Name = "textBox7"; 388 | this.textBox7.Size = new System.Drawing.Size(175, 20); 389 | this.textBox7.TabIndex = 8; 390 | // 391 | // textBox8 392 | // 393 | this.textBox8.Anchor = System.Windows.Forms.AnchorStyles.Left; 394 | this.textBox8.Location = new System.Drawing.Point(111, 129); 395 | this.textBox8.Name = "textBox8"; 396 | this.textBox8.Size = new System.Drawing.Size(55, 20); 397 | this.textBox8.TabIndex = 10; 398 | // 399 | // headerTableLayoutPanel4 400 | // 401 | this.headerTableLayoutPanel4.AutoSize = true; 402 | this.headerTableLayoutPanel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 403 | this.headerTableLayoutPanel4.CaptionText = "Employer"; 404 | this.headerTableLayoutPanel4.ColumnCount = 2; 405 | this.headerTableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 406 | this.headerTableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 407 | this.headerTableLayoutPanel4.Controls.Add(this.label12, 0, 0); 408 | this.headerTableLayoutPanel4.Controls.Add(this.label13, 0, 1); 409 | this.headerTableLayoutPanel4.Controls.Add(this.textBox9, 1, 0); 410 | this.headerTableLayoutPanel4.Controls.Add(this.textBox10, 1, 1); 411 | this.headerTableLayoutPanel4.Location = new System.Drawing.Point(258, 171); 412 | this.headerTableLayoutPanel4.Name = "headerTableLayoutPanel4"; 413 | this.headerTableLayoutPanel4.Padding = new System.Windows.Forms.Padding(2); 414 | this.headerTableLayoutPanel4.RowCount = 2; 415 | this.headerTableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); 416 | this.headerTableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); 417 | this.headerTableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 418 | this.headerTableLayoutPanel4.Size = new System.Drawing.Size(291, 73); 419 | this.headerTableLayoutPanel4.TabIndex = 3; 420 | // 421 | // label12 422 | // 423 | this.label12.Anchor = System.Windows.Forms.AnchorStyles.Right; 424 | this.label12.AutoSize = true; 425 | this.label12.Location = new System.Drawing.Point(5, 25); 426 | this.label12.MinimumSize = new System.Drawing.Size(100, 0); 427 | this.label12.Name = "label12"; 428 | this.label12.Size = new System.Drawing.Size(100, 13); 429 | this.label12.TabIndex = 0; 430 | this.label12.Text = "Company Name:"; 431 | this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 432 | // 433 | // label13 434 | // 435 | this.label13.Anchor = System.Windows.Forms.AnchorStyles.Right; 436 | this.label13.AutoSize = true; 437 | this.label13.Location = new System.Drawing.Point(5, 51); 438 | this.label13.MinimumSize = new System.Drawing.Size(100, 0); 439 | this.label13.Name = "label13"; 440 | this.label13.Size = new System.Drawing.Size(100, 13); 441 | this.label13.TabIndex = 1; 442 | this.label13.Text = "Phone:"; 443 | this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 444 | // 445 | // textBox9 446 | // 447 | this.textBox9.Anchor = System.Windows.Forms.AnchorStyles.Left; 448 | this.textBox9.Location = new System.Drawing.Point(111, 22); 449 | this.textBox9.Name = "textBox9"; 450 | this.textBox9.Size = new System.Drawing.Size(175, 20); 451 | this.textBox9.TabIndex = 2; 452 | // 453 | // textBox10 454 | // 455 | this.textBox10.Anchor = System.Windows.Forms.AnchorStyles.Left; 456 | this.textBox10.Location = new System.Drawing.Point(111, 48); 457 | this.textBox10.Name = "textBox10"; 458 | this.textBox10.Size = new System.Drawing.Size(125, 20); 459 | this.textBox10.TabIndex = 3; 460 | // 461 | // toolStrip1 462 | // 463 | this.toolStrip1.Location = new System.Drawing.Point(0, 0); 464 | this.toolStrip1.Name = "toolStrip1"; 465 | this.toolStrip1.Size = new System.Drawing.Size(624, 25); 466 | this.toolStrip1.TabIndex = 5; 467 | this.toolStrip1.Text = "toolStrip2"; 468 | this.toolStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStrip1_ItemClicked); 469 | // 470 | // toolStrip2 471 | // 472 | this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 473 | this.toolStripLabel1, 474 | this.toolStripTextBox1, 475 | this.toolStripLabel2, 476 | this.toolStripComboBox1}); 477 | this.toolStrip2.Location = new System.Drawing.Point(0, 25); 478 | this.toolStrip2.Name = "toolStrip2"; 479 | this.toolStrip2.Size = new System.Drawing.Size(624, 25); 480 | this.toolStrip2.TabIndex = 6; 481 | this.toolStrip2.Text = "toolStrip2"; 482 | // 483 | // toolStripLabel1 484 | // 485 | this.toolStripLabel1.Name = "toolStripLabel1"; 486 | this.toolStripLabel1.Size = new System.Drawing.Size(52, 22); 487 | this.toolStripLabel1.Text = "Caption:"; 488 | // 489 | // toolStripTextBox1 490 | // 491 | this.toolStripTextBox1.Name = "toolStripTextBox1"; 492 | this.toolStripTextBox1.Size = new System.Drawing.Size(100, 25); 493 | // 494 | // toolStripLabel2 495 | // 496 | this.toolStripLabel2.Name = "toolStripLabel2"; 497 | this.toolStripLabel2.Size = new System.Drawing.Size(65, 22); 498 | this.toolStripLabel2.Text = "Line width:"; 499 | // 500 | // toolStripComboBox1 501 | // 502 | this.toolStripComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 503 | this.toolStripComboBox1.Name = "toolStripComboBox1"; 504 | this.toolStripComboBox1.Size = new System.Drawing.Size(75, 25); 505 | // 506 | // Form2 507 | // 508 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 509 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 510 | this.AutoSize = true; 511 | this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 512 | this.ClientSize = new System.Drawing.Size(624, 442); 513 | this.Controls.Add(this.flowLayoutPanel1); 514 | this.Controls.Add(this.toolStrip2); 515 | this.Controls.Add(this.toolStrip1); 516 | this.Name = "Form2"; 517 | this.Text = "Form2"; 518 | this.flowLayoutPanel1.ResumeLayout(false); 519 | this.flowLayoutPanel1.PerformLayout(); 520 | this.headerTableLayoutPanel1.ResumeLayout(false); 521 | this.headerTableLayoutPanel1.PerformLayout(); 522 | this.headerTableLayoutPanel2.ResumeLayout(false); 523 | this.headerTableLayoutPanel2.PerformLayout(); 524 | this.headerTableLayoutPanel3.ResumeLayout(false); 525 | this.headerTableLayoutPanel3.PerformLayout(); 526 | this.headerTableLayoutPanel4.ResumeLayout(false); 527 | this.headerTableLayoutPanel4.PerformLayout(); 528 | this.toolStrip2.ResumeLayout(false); 529 | this.toolStrip2.PerformLayout(); 530 | this.ResumeLayout(false); 531 | this.PerformLayout(); 532 | 533 | } 534 | 535 | #endregion 536 | 537 | private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; 538 | private CBComponents.HeaderTableLayoutPanel headerTableLayoutPanel1; 539 | private System.Windows.Forms.Label label1; 540 | private System.Windows.Forms.TextBox textBox1; 541 | private System.Windows.Forms.Label label3; 542 | private CBComponents.HeaderTableLayoutPanel headerTableLayoutPanel2; 543 | private System.Windows.Forms.Label label4; 544 | private System.Windows.Forms.TextBox textBox4; 545 | private System.Windows.Forms.Label label5; 546 | private CBComponents.HeaderTableLayoutPanel headerTableLayoutPanel3; 547 | private System.Windows.Forms.Label label7; 548 | private System.Windows.Forms.Label label8; 549 | private System.Windows.Forms.ComboBox comboBox2; 550 | private CBComponents.HeaderTableLayoutPanel headerTableLayoutPanel4; 551 | private System.Windows.Forms.Label label12; 552 | private System.Windows.Forms.TextBox textBox9; 553 | private System.Windows.Forms.Label label13; 554 | private System.Windows.Forms.Label label2; 555 | private System.Windows.Forms.TextBox textBox2; 556 | private System.Windows.Forms.TextBox textBox3; 557 | private System.Windows.Forms.Label label9; 558 | private System.Windows.Forms.ComboBox comboBox1; 559 | private System.Windows.Forms.ComboBox comboBox3; 560 | private System.Windows.Forms.TextBox textBox7; 561 | private System.Windows.Forms.Label label10; 562 | private System.Windows.Forms.Label label11; 563 | private System.Windows.Forms.TextBox textBox8; 564 | private System.Windows.Forms.TextBox textBox6; 565 | private System.Windows.Forms.Label label_6; 566 | private System.Windows.Forms.TextBox textBox5; 567 | private System.Windows.Forms.TextBox textBox10; 568 | private System.Windows.Forms.ToolStrip toolStrip1; 569 | private System.Windows.Forms.ToolStrip toolStrip2; 570 | private System.Windows.Forms.ToolStripLabel toolStripLabel1; 571 | private System.Windows.Forms.ToolStripTextBox toolStripTextBox1; 572 | private System.Windows.Forms.ToolStripLabel toolStripLabel2; 573 | private System.Windows.Forms.ToolStripComboBox toolStripComboBox1; 574 | } 575 | } -------------------------------------------------------------------------------- /Examples/Form2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.Windows.Forms; 4 | 5 | using CBComponents; 6 | 7 | namespace Examples 8 | { 9 | public partial class Form2 : Form 10 | { 11 | public Form2() 12 | { 13 | InitializeComponent(); 14 | this.Shown += delegate { this.textBox1.Focus(); }; 15 | this.FormClosed += delegate { Application.Exit(); }; 16 | 17 | // buttons for changing CaptionStyle 18 | Type _type = typeof(HeaderTableLayoutPanel.HighlightCaptionStyle); 19 | foreach (var _style in Enum.GetValues(_type)) 20 | this.toolStrip1.Items.Add(new ToolStripButton() { 21 | Text = Enum.GetName(_type, _style), 22 | Tag = _style, 23 | DisplayStyle = ToolStripItemDisplayStyle.Text }); 24 | this.toolStrip1.Items[1].PerformClick(); 25 | 26 | // strip for changing width of CaptionLineWidth 27 | this.toolStripComboBox1.Items.AddRange(new object[] { (byte)0, (byte)1, (byte)2, (byte)3, (byte)4, (byte)6, (byte)8, (byte)10, (byte)20 }); 28 | this.toolStripComboBox1.SelectedIndexChanged += toolStripComboBox1_SelectedIndexChanged; 29 | this.toolStripComboBox1.SelectedIndex = 2; 30 | 31 | // strip for changing text of CaptionText 32 | this.toolStripTextBox1.TextChanged += toolStripTextBox1_TextChanged; 33 | 34 | } 35 | 36 | private void toolStripTextBox1_TextChanged(object sender, EventArgs e) 37 | { 38 | foreach (HeaderTableLayoutPanel _panel in this.flowLayoutPanel1.Controls) 39 | { 40 | _panel.CaptionText = this.toolStripTextBox1.Text; 41 | _panel.PerformLayout(); 42 | } 43 | } 44 | 45 | private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e) 46 | { 47 | if (this.toolStripComboBox1.SelectedItem is byte) 48 | { 49 | byte _width = (byte)this.toolStripComboBox1.SelectedItem; 50 | foreach (HeaderTableLayoutPanel _panel in this.flowLayoutPanel1.Controls) 51 | { 52 | _panel.CaptionLineWidth = _width; 53 | _panel.PerformLayout(); 54 | } 55 | } 56 | } 57 | 58 | private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e) 59 | { 60 | if (e.ClickedItem.Tag is HeaderTableLayoutPanel.HighlightCaptionStyle) 61 | { 62 | var _style = (HeaderTableLayoutPanel.HighlightCaptionStyle)e.ClickedItem.Tag; 63 | foreach (HeaderTableLayoutPanel _panel in this.flowLayoutPanel1.Controls) 64 | { 65 | _panel.CaptionStyle = _style; 66 | _panel.PerformLayout(); 67 | } 68 | foreach (ToolStripButton _button in this.toolStrip1.Items) 69 | _button.Checked = _button == e.ClickedItem; 70 | } 71 | } 72 | 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Examples/Form2.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 137, 17 125 | 126 | -------------------------------------------------------------------------------- /Examples/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace Examples 6 | { 7 | static class Program 8 | { 9 | /// 10 | // Examples of the HeaderTableLayoutPanel WinForms control 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new Form1()); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Examples/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("HeaderTableLayoutPanelExamples")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Examples for HeaderTableLayoutPanel")] 13 | [assembly: AssemblyCopyright("Copyright © Radu Martin, 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f694e984-dd7b-44ae-81a9-585625248db9")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Examples/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /HeaderTableLayoutPanel.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeaderTableLayoutPanel", "Source\HeaderTableLayoutPanel.csproj", "{9823A7EF-3BA9-4B90-9F40-6E9806161B8A}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples", "Examples\Examples.csproj", "{F694E984-DD7B-44AE-81A9-585625248DB9}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {9823A7EF-3BA9-4B90-9F40-6E9806161B8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {9823A7EF-3BA9-4B90-9F40-6E9806161B8A}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {9823A7EF-3BA9-4B90-9F40-6E9806161B8A}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {9823A7EF-3BA9-4B90-9F40-6E9806161B8A}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {F694E984-DD7B-44AE-81A9-585625248DB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {F694E984-DD7B-44AE-81A9-585625248DB9}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {F694E984-DD7B-44AE-81A9-585625248DB9}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {F694E984-DD7B-44AE-81A9-585625248DB9}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Radu Martin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Media/img_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datarza/HeaderTableLayoutPanel/336881ab5b775ff7fedca552ef9d044df1fb954c/Media/img_01.png -------------------------------------------------------------------------------- /Media/img_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datarza/HeaderTableLayoutPanel/336881ab5b775ff7fedca552ef9d044df1fb954c/Media/img_02.png -------------------------------------------------------------------------------- /Media/img_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datarza/HeaderTableLayoutPanel/336881ab5b775ff7fedca552ef9d044df1fb954c/Media/img_03.png -------------------------------------------------------------------------------- /Media/img_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datarza/HeaderTableLayoutPanel/336881ab5b775ff7fedca552ef9d044df1fb954c/Media/img_04.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HeaderTableLayoutPanel 2 | 3 | HeaderTableLayoutPanel is a WinForms control inherited from TableLayoutPanel and provides highlighted header. 4 | 5 | ## Problem 6 | 7 | There are a lot of panels for grouping the controls in WinForms. The best one of them is _TableLayoutPanel_, especially for grouping controls, that are using for editing data. Unfortunately, this panel does not show the header. This necessity appears when there are different kinds of editing controls on the same Windows form. 8 | 9 | ## Solution 10 | 11 | It can be solved by _GroupBox_ and _TableLayoutPanel_. This solution is easy, but may look unpleasant. Another possibility is using _Label_ control in first row of _TableLayoutPanel_. This solution may be uncomfortable. 12 | 13 | I prefer to make inherited panel from _TableLayoutPanel_ with all necessary functions. 14 | 15 | ## How It works 16 | 17 | TableLayoutPanel with highlighted header called _HeaderTableLayoutPanel_ is simple, useful, and cute. This control may show the header in a number of different ways: 18 | 19 | ![How It works](Media/img_01.png) 20 | 21 | The _HeaderTableLayoutPanel_ implements just three properties: 22 | - _CaptionText_ - string property that contains a text for showing. If this property is _string.Empty_ or _null_ then the header will not be shown 23 | - _CaptionStyle_ - this is enum (_HighlightCaptionStyle_) property that points a drawing style. It can be: _ForeColor_, _HighlightColor_, _ForeStyle_, _HighlightStyle_, _NavisionAxaptaStyle_, _GroupBoxStyle_ (see the image above) 24 | - _CaptionLineWidth_ - byte property that points the width of header's line (0 - the line will not be shown) 25 | 26 | Be aware of _CaptionLineWidth_. If _CaptionStyle = HighlightCaptionStyle.HighlightStyle_, then two lines with _Width = CaptionLineWidth_ will be shown, one will be above the Header and the second one will be below the header. For _CaptionStyle = HighlightCaptionStyle.GroupBoxStyle_ this property does not do anything. 27 | 28 | #### Screens 29 | 30 | ![Screen 1](Media/img_02.png) 31 | ![Screen 2](Media/img_03.png) 32 | ![Screen 3](Media/img_04.png) 33 | 34 | ## How to use it 35 | 36 | The following example explains the procedure to create a new HeaderTableLayoutPanel: 37 | ``` 38 | using CBComponents; 39 | ... 40 | var headerTableLayoutPanel = new HeaderTableLayoutPanel() 41 | { 42 | CaptionText = "Preferred text for header", 43 | CaptionStyle = HeaderTableLayoutPanel.HighlightCaptionStyle.NavisionAxaptaStyle, 44 | CaptionLineWidth = 2 45 | }; 46 | this.Controls.Add(headerTableLayoutPanel1); 47 | ``` 48 | To install _HeaderTableLayoutPanel_, run the following command in the [Package Manager Console](https://www.nuget.org/packages/CBComponents.HeaderTableLayoutPanel): 49 | ``` 50 | PM> Install-Package CBComponents.HeaderTableLayoutPanel 51 | ``` 52 | Alternative option: [download compiled library and examples](https://github.com/CanadianBeaver/HeaderTableLayoutPanel/raw/master/Build/CBComponents.HeaderTableLayoutPanel.zip). 53 | 54 | ## Supported .NET Frameworks 55 | 56 | _HeaderTableLayoutPanel_ inherits from [_TableLayoutPanel_](https://msdn.microsoft.com/library/system.windows.forms.tablelayoutpanel), which was implemented in Microsoft .NET Framework 3.5. In general _HeaderTableLayoutPanel_ does not use any special requirements. It can be compiled on any Microsoft .NET Framework platform (including the .NET Framework 3.5 client profile). 57 | 58 | ## Contacts 59 | 60 | I would appreciate hearing your opinion on this. If you have any questions, please feel free to contact me by email: [radu.martin@hotmail.com](mailto://radu.martin@hotmail.com) 61 | -------------------------------------------------------------------------------- /Source/HeaderTableLayoutPanel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Drawing; 4 | using System.Drawing.Drawing2D; 5 | using System.Windows.Forms; 6 | 7 | // 8 | // HeaderTableLayoutPanel 9 | // 10 | // This is the WinForms control based on TableLayoutPanel 11 | // and can show the highlighted header in different ways 12 | // 13 | // Author: Radu Martin (CanadianBeaver) 14 | // Email: radu.martin@hotmail.com 15 | // GitHub: https://github.com/CanadianBeaver/HeaderTableLayoutPanel 16 | // 17 | 18 | namespace CBComponents 19 | { 20 | [ToolboxBitmap(typeof(TableLayoutPanel))] 21 | public class HeaderTableLayoutPanel : System.Windows.Forms.TableLayoutPanel 22 | { 23 | /// 24 | /// Header text 25 | /// 26 | [Browsable(true), DefaultValue(null), Category("Header"), Description("Header text")] 27 | public string CaptionText 28 | { 29 | get { return this.captionText; } 30 | set 31 | { 32 | if (this.captionText != value) 33 | { 34 | this.captionText = value; 35 | this.CalculateCaptionParams(); 36 | Invalidate(); 37 | } 38 | } 39 | } 40 | private string captionText = null; 41 | 42 | /// 43 | /// Drawing styles for Header 44 | /// 45 | public enum HighlightCaptionStyle 46 | { 47 | ForeColor, HighlightColor, ForeStyle, HighlightStyle, NavisionAxaptaStyle, GroupBoxStyle 48 | } 49 | 50 | /// 51 | /// Drawing header style 52 | /// 53 | [Browsable(true), DefaultValue(HighlightCaptionStyle.ForeColor), Category("Header"), Description("Drawing header style")] 54 | public HighlightCaptionStyle CaptionStyle 55 | { 56 | get { return this.captionStyle; } 57 | set 58 | { 59 | if (this.captionStyle != value) 60 | { 61 | this.captionStyle = value; 62 | this.CalculateCaptionParams(); 63 | Invalidate(); 64 | } 65 | } 66 | } 67 | private HighlightCaptionStyle captionStyle = HighlightCaptionStyle.ForeColor; 68 | 69 | /// 70 | /// Width of the header line 71 | /// 72 | [Browsable(true), DefaultValue((byte)2), Category("Header"), Description("Width of the header line")] 73 | public byte CaptionLineWidth 74 | { 75 | get { return this.captionLineWidth; } 76 | set 77 | { 78 | if (this.captionLineWidth != value) 79 | { 80 | this.captionLineWidth = value; 81 | this.CalculateCaptionParams(); 82 | Invalidate(); 83 | } 84 | } 85 | } 86 | private byte captionLineWidth = 2; 87 | 88 | protected override void OnForeColorChanged(EventArgs e) 89 | { 90 | base.OnForeColorChanged(e); 91 | this.CalculateCaptionParams(); 92 | Invalidate(); 93 | } 94 | 95 | protected override void OnBackColorChanged(EventArgs e) 96 | { 97 | base.OnBackColorChanged(e); 98 | this.CalculateCaptionParams(); 99 | Invalidate(); 100 | } 101 | 102 | protected override void OnFontChanged(EventArgs e) 103 | { 104 | base.OnFontChanged(e); 105 | this.CalculateCaptionParams(); 106 | Invalidate(); 107 | } 108 | 109 | // calculating and storing params for drawing 110 | private int captionTextWidth; 111 | private int captionTextHeight; 112 | private Color captionTextColor; 113 | private Color captionLineBeginColor; 114 | private Color captionLineEndColor; 115 | private void CalculateCaptionParams() 116 | { 117 | if (!string.IsNullOrEmpty(this.captionText)) 118 | using (var g = this.CreateGraphics()) 119 | { 120 | var _size = g.MeasureString(this.captionText + "I", this.Font).ToSize(); 121 | this.captionTextWidth = _size.Width; 122 | this.captionTextHeight = _size.Height; 123 | } 124 | else 125 | { 126 | this.captionTextWidth = 0; 127 | this.captionTextHeight = 0; 128 | } 129 | if (this.captionStyle == HighlightCaptionStyle.ForeColor) 130 | { 131 | this.captionTextColor = this.ForeColor; 132 | this.captionLineBeginColor = this.ForeColor; 133 | this.captionLineEndColor = this.BackColor; 134 | } 135 | else if (this.captionStyle == HighlightCaptionStyle.ForeStyle) 136 | { 137 | this.captionTextColor = this.BackColor; 138 | this.captionLineBeginColor = this.ForeColor; 139 | this.captionLineEndColor = this.BackColor; 140 | } 141 | else 142 | { 143 | this.captionTextColor = this.captionStyle == HighlightCaptionStyle.HighlightStyle ? SystemColors.HighlightText : SystemColors.Highlight; 144 | this.captionLineBeginColor = SystemColors.MenuHighlight; 145 | this.captionLineEndColor = this.BackColor; 146 | } 147 | } 148 | 149 | // changing Rectangle according CaptionText and CaptionStyle 150 | public override Rectangle DisplayRectangle 151 | { 152 | get 153 | { 154 | var result = base.DisplayRectangle; 155 | int resize = 0; 156 | if (this.captionTextHeight > 0) 157 | { 158 | resize = this.captionTextHeight; 159 | if (this.captionStyle == HighlightCaptionStyle.NavisionAxaptaStyle) resize += 1; 160 | else if (this.captionStyle == HighlightCaptionStyle.ForeStyle || this.captionStyle == HighlightCaptionStyle.HighlightStyle) resize += 1; 161 | else if (this.captionStyle != HighlightCaptionStyle.GroupBoxStyle) resize += this.captionLineWidth > 0 ? 2 : 1; 162 | } 163 | else if (this.captionStyle == HighlightCaptionStyle.GroupBoxStyle) resize += 10; 164 | if (this.captionStyle == HighlightCaptionStyle.ForeStyle || this.captionStyle == HighlightCaptionStyle.HighlightStyle) resize += this.captionLineWidth * 2; 165 | else if (this.captionStyle == HighlightCaptionStyle.ForeColor || this.captionStyle == HighlightCaptionStyle.HighlightColor) resize += this.captionLineWidth; 166 | result.Height -= resize; 167 | result.Offset(0, resize); 168 | return result; 169 | } 170 | } 171 | 172 | // changing Size according CaptionText and CaptionStyle 173 | protected override Size SizeFromClientSize(Size clientSize) 174 | { 175 | var result = base.SizeFromClientSize(clientSize); 176 | int resize = 0; 177 | if (this.captionTextHeight > 0) 178 | { 179 | resize = this.captionTextHeight; 180 | if (this.captionStyle == HighlightCaptionStyle.NavisionAxaptaStyle) resize += 1; 181 | else if (this.captionStyle == HighlightCaptionStyle.ForeStyle || this.captionStyle == HighlightCaptionStyle.HighlightStyle) resize += 1; 182 | else if (this.captionStyle != HighlightCaptionStyle.GroupBoxStyle) resize += this.captionLineWidth > 0 ? 2 : 1; 183 | } 184 | else if (this.captionStyle == HighlightCaptionStyle.GroupBoxStyle) resize += 10; 185 | if (this.captionStyle == HighlightCaptionStyle.ForeStyle || this.captionStyle == HighlightCaptionStyle.HighlightStyle) resize += this.captionLineWidth * 2; 186 | else if (this.captionStyle == HighlightCaptionStyle.ForeColor || this.captionStyle == HighlightCaptionStyle.HighlightColor) resize += this.captionLineWidth; 187 | result.Height += resize; 188 | return result; 189 | } 190 | 191 | protected override void OnPaint(PaintEventArgs e) 192 | { 193 | base.OnPaint(e); 194 | // draw gradient 195 | if (this.captionStyle == HighlightCaptionStyle.ForeStyle || this.captionStyle == HighlightCaptionStyle.HighlightStyle) 196 | { // HighlightCaptionStyle.HighlightStyle allways draw 197 | float _wPen = this.captionLineWidth * 2 + this.captionTextHeight; 198 | if (_wPen > 0) 199 | using (Brush _gBrush = new LinearGradientBrush(new Point(0, 0), new Point(this.Width, 0), this.captionLineBeginColor, this.captionLineEndColor)) 200 | using (Pen _gPen = new Pen(_gBrush, _wPen)) 201 | e.Graphics.DrawLine(_gPen, 0, _wPen / 2, this.Width, _wPen / 2); 202 | } 203 | else if (this.captionStyle == HighlightCaptionStyle.GroupBoxStyle) 204 | { // HighlightCaptionStyle.GroupBox draw GroupBox canvas 205 | string _capText = this.captionText; 206 | if (!string.IsNullOrEmpty(_capText)) 207 | { 208 | _capText = _capText.Trim(); 209 | if (!string.IsNullOrEmpty(_capText)) _capText = string.Format(" {0} ", _capText); 210 | } 211 | GroupBoxRenderer.DrawGroupBox(e.Graphics, this.ClientRectangle, _capText, this.Font, this.captionTextColor, this.Enabled ? System.Windows.Forms.VisualStyles.GroupBoxState.Normal : System.Windows.Forms.VisualStyles.GroupBoxState.Disabled); 212 | } 213 | else if (this.captionLineWidth > 0) 214 | if (this.captionStyle != HighlightCaptionStyle.NavisionAxaptaStyle) 215 | { // HighlightCaptionMode.ForeColor | HighlightCaptionMode.HighlightColor 216 | using (Brush _gradientBrush = new LinearGradientBrush(new Point(0, 0), new Point(this.Width, 0), this.captionLineBeginColor, this.captionLineEndColor)) 217 | using (Pen _gradientPen = new Pen(_gradientBrush, this.captionLineWidth)) 218 | e.Graphics.DrawLine(_gradientPen, 0, this.captionTextHeight + this.captionLineWidth / 2, this.Width, this.captionTextHeight + this.captionLineWidth / 2); 219 | } 220 | else if (this.captionTextWidth + 1 < this.Width) 221 | { // HighlightCaptionMode.NavisionAxapta 222 | using (Brush _gradientBrush = new LinearGradientBrush(new Point(this.captionTextWidth, 0), new Point(this.Width, 0), this.captionLineBeginColor, this.captionLineEndColor)) 223 | using (Pen _gradientPen = new Pen(_gradientBrush, this.captionLineWidth > this.captionTextHeight ? this.captionTextHeight : this.captionLineWidth)) 224 | e.Graphics.DrawLine(_gradientPen, this.captionTextWidth, this.captionTextHeight / 2 + 1, this.Width, this.captionTextHeight / 2 + 1); 225 | } 226 | // draw Text 227 | if (this.captionTextHeight > 0 && this.captionStyle != HighlightCaptionStyle.GroupBoxStyle) 228 | using (Brush _textBrush = new SolidBrush(this.captionTextColor)) 229 | e.Graphics.DrawString(this.captionText, this.Font, _textBrush, 0, this.captionStyle == HighlightCaptionStyle.HighlightStyle || this.captionStyle == HighlightCaptionStyle.ForeStyle ? this.CaptionLineWidth : 0); 230 | } 231 | 232 | } 233 | } 234 | -------------------------------------------------------------------------------- /Source/HeaderTableLayoutPanel.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9823A7EF-3BA9-4B90-9F40-6E9806161B8A} 8 | Library 9 | Properties 10 | CBComponents 11 | CBComponents.HeaderTableLayoutPanel 12 | v3.5 13 | 512 14 | 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Component 42 | 43 | 44 | 45 | 46 | 47 | Designer 48 | 49 | 50 | 51 | 58 | -------------------------------------------------------------------------------- /Source/HeaderTableLayoutPanel.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CBComponents.HeaderTableLayoutPanel 5 | $version$ 6 | HeaderTableLayoutPanel 7 | Radu Martin 8 | $author$ 9 | https://en.wikipedia.org/wiki/MIT_License 10 | https://github.com/CanadianBeaver/HeaderTableLayoutPanel 11 | 12 | false 13 | TableLayoutPanel with highlighted header 14 | License acceptance has been changed. 15 | Copyright © Radu Martin, 2017 16 | visual-studio csharp winforms winforms-controls library controls panel tablelayout windows layout-engine layouts programming visualisation visual-studio-code databases free 17 | 18 | -------------------------------------------------------------------------------- /Source/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("HeaderTableLayoutPanel")] 9 | [assembly: AssemblyDescription("TableLayoutPanel with Header")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("HeaderTableLayoutPanel")] 13 | [assembly: AssemblyCopyright("Copyright © Radu Martin, 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9823a7ef-3ba9-4b90-9f40-6e9806161b8a")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.2.*")] 36 | [assembly: AssemblyFileVersion("1.2")] 37 | --------------------------------------------------------------------------------