Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software


/* run this code under .NET 1.1 and the label
column 'Bla' is chopped off! I've tried everything to fix this! */

using System;
using System.Data;
using System.Windows.Forms;

public class Form1 : System.Windows.Forms.Form
public static void Main () {
Application.Run (new Form1());
public Form1()
this.ClientSize = new System.Drawing.Size(292, 266);
this.Text = "Form1";
DataGridTableStyle dgts = new DataGridTableStyle();
DataTable dt = new DataTable();
dt.Columns.Add (new DataColumn ("bla",Type.GetType ("System.Int32")));
DataGrid dg = new DataGrid();
dg.Parent = this;
dgts.GridColumnStyles[0].Alignment = HorizontalAlignment.Right;

Wednesday, September 29, 2004

I haven't seen any responses yet -- just an FYI -- it's not specific to you. I'm seeing it too. I haven't found a solution to the issue, but it is most definitely a repeatable issue. I've tried it on 3 different computers and they're all displaying the same behavior.

Sgt. Sausage
Thursday, September 30, 2004

I could reproduce the problem on .NET 1.1 SP1, but not resolve it.

Just me (Sir to you)
Friday, October 1, 2004

I figured out that if you add a pipe symbol to the end, it works perfectly (eg. HeaderText = "Blah|"). The pipe is perfectly obscured by the gridline, and the text itself is OK.

I got this from a guy who suggested doing the same with a period on The period looks crappy, but the pipe is OK.

Friday, October 1, 2004

*  Recent Topics

*  Fog Creek Home