Windows 第一项的 Forms ListBox ItemHeight 不起作用

Windows Forms ListBox ItemHeight for first item doesn't work

我正在尝试制作一个包含可变大小项目的列表框。我有那么多工作要做,如下所示:

但是如您所见,第一项似乎被忽略了。 这是怎么回事以及我如何让它也受到 ItemHeight 的影响属性? 我的代码如下所示:

private void ClassicEvent_Load(object sender, EventArgs e)
{
    eventCommands.DrawMode = DrawMode.OwnerDrawVariable;
    eventCommands.MeasureItem += EventCommands_MeasureItem;
    eventCommands.DrawItem += EventCommands_DrawItem;

    eventCommands.Items.Add("Text: I heard you were going to the Pokémon Centre.");
    eventCommands.Items.Add("if (Has Pokemon (Bulbasaur) in PC)");
    eventCommands.Items.Add("    Text: You have a Bulbasaur.");
    eventCommands.Items.Add("else");
    eventCommands.Items.Add("    Text: You don't have a Bulbasaur.");
    eventCommands.Items.Add("end");
    eventCommands.Items.Add("Text: So be it, then.");
}

private void EventCommands_DrawItem(object sender, DrawItemEventArgs e)
{
    e.DrawBackground();
    e.Graphics.DrawString(eventCommands.Items[e.Index].ToString(), e.Font, new SolidBrush(e.ForeColor), e.Bounds);
    e.DrawFocusRectangle();
}

private void EventCommands_MeasureItem(object sender, MeasureItemEventArgs e)
{
    eventCommands.ItemHeight = 48;
}

已经 尝试更改 e.Bounds 矩形,如果迭代的项目是第一个,也尝试更改 ItemHeight,但我无法弄清楚。

EventCommands_MeasureItem中,显然MeasureItemEventArgs e也包含一个ItemHeight属性。使用 确实 有效。