Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/262.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
标签之间的粗线(C#)_C#_Lines_System.drawing_Labels_Sudoku - Fatal编程技术网

标签之间的粗线(C#)

标签之间的粗线(C#),c#,lines,system.drawing,labels,sudoku,C#,Lines,System.drawing,Labels,Sudoku,我想制作一个标签的数独字段,我有代码。 现在我想在一些标签之间画一条粗线,这样你就可以看到哪一块标签在一起了 此代码使标签: const int spacing = 30; //ruimte tussen kotjes int aantal = (int)nudColsPerBlock.Value * (int)nudRowsPerBlock.Value; //totaal aantal kotjes per rij/kolom Label[][

我想制作一个标签的数独字段,我有代码。 现在我想在一些标签之间画一条粗线,这样你就可以看到哪一块标签在一起了

此代码使标签:

const int spacing = 30;  //ruimte tussen kotjes
            int aantal = (int)nudColsPerBlock.Value * (int)nudRowsPerBlock.Value; //totaal aantal kotjes per rij/kolom
            Label[][] SudokuRaster = new Label[aantal][];
            for (int x = 0; x < aantal; x++)
            {
                SudokuRaster[x] = new Label[aantal];
                for (int y = 0; y < aantal; y++)
                {
                    SudokuRaster[x][y] = new Label();
                    SudokuRaster[x][y].BorderStyle = BorderStyle.FixedSingle;
                    SudokuRaster[x][y].Location = new System.Drawing.Point(x * spacing, y * spacing);
                    SudokuRaster[x][y].Name = "Sudoku" + x.ToString() + "," + y.ToString();
                    SudokuRaster[x][y].Size = new Size(spacing, spacing);
                    SudokuRaster[x][y].TabIndex = 0;
                    SudokuRaster[x][y].MouseClick += new System.Windows.Forms.MouseEventHandler(this.MouseClick);

                }
                this.Controls.AddRange(SudokuRaster[x]);
            }
const int间距=30//ruimte tussen kotjes
int aantal=(int)nudColsPerBlock.Value*(int)nudRowsPerBlock.Value//每个里杰/科隆的科特杰酒店
标签[][]SudokuRaster=新标签[aantal][];
对于(intx=0;x
Just in care you's Interest,这是我使用当前.Net桌面UI技术的数独板示例。在容器的Paint()事件中为标签绘制线条,或者添加其他没有文本且高度为2的标签作为线条。