标签之间的粗线(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的标签作为线条。