private void PropertyView_DoubleClick(object sender, EventArgs e)
{
lvItem_ = this.GetItemAt(mx_, my_);
if (lvItem_ != null)
{
int x1 = this.Columns[0].Width + 2;
if (mx_ >= x1)
{
int x2 = x1 + this.Columns[1].Width;
int r = lvItem_.Index;
Property prop = (Property)propList_[r];
if (prop.isSelection())
{
addSelections(prop.getOptions());
comboBox_.Size = new System.Drawing.Size(x2 - x1, lvItem_.Bounds.Height);
comboBox_.Location = new System.Drawing.Point(x1, lvItem_.Bounds.Top);
comboBox_.Show();
comboBox_.Text = lvItem_.SubItems[1].Text;
comboBox_.SelectAll();
comboBox_.Focus();
}
else
{
editBox_.Size = new System.Drawing.Size(x2 - x1, lvItem_.Bounds.Height - 2);
editBox_.Location = new System.Drawing.Point(x1, lvItem_.Bounds.Top);
editBox_.Show();
editBox_.Text = lvItem_.SubItems[1].Text;
editBox_.SelectAll();
editBox_.Focus();
}
}
}
}