Note that there are some explanatory texts on larger screens.

plurals
  1. POCombobox closes before i can select a checkbox
    primarykey
    data
    text
    <p>I'm currently working in VS 2012. .NET 4.5 and working on an mmc snap-in. (i know right?!)</p> <p>so i followed this topic:</p> <p><a href="https://stackoverflow.com/questions/8822678/is-there-a-simple-way-to-implement-a-checked-combobox-in-winforms">Is there a simple way to implement a Checked Combobox in WinForms</a></p> <p>as i want something similar to the scheduled task manager.</p> <p>But that solution does not seem to work for me. the listview pops up but when i try to click on a checkbox in my listview. It gives me a big middle finger and closes my dropdown.</p> <p>is there any way i can suppress the combobox's "focus lost" close event? i can, not hide the list but then it never hides.</p> <p>For Example:</p> <pre><code>// designer class // // comboBox1 // this.comboBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.comboBox1.DropDownHeight = 1; this.comboBox1.DropDownWidth = 1; this.comboBox1.FormattingEnabled = true; this.comboBox1.IntegralHeight = false; this.comboBox1.Location = new System.Drawing.Point(256, 371); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(238, 21); this.comboBox1.TabIndex = 5; this.comboBox1.DropDown += new System.EventHandler(this.comboBox1_DropDown); this.comboBox1.DropDownClosed += new System.EventHandler(this.comboBox1_DropDownClosed); // // lstWeekDays // this.lstWeekDays.CheckBoxes = true; this.lstWeekDays.Location = new System.Drawing.Point(50, 63); this.lstWeekDays.Name = "lstWeekDays"; this.lstWeekDays.Size = new System.Drawing.Size(263, 97); this.lstWeekDays.TabIndex = 13; this.lstWeekDays.Tag = "lstlstWeekDays"; this.lstWeekDays.UseCompatibleStateImageBehavior = false; this.lstWeekDays.View = System.Windows.Forms.View.SmallIcon; this.lstWeekDays.Visible = false; // Code behind public Form1() { InitializeComponent(); this.lstWeekDays.Items.Add("Monday"); this.lstWeekDays.Items.Add("Tuesday"); this.lstWeekDays.Items.Add("Wednesday"); this.lstWeekDays.Items.Add("Thursday"); this.lstWeekDays.Items.Add("Friday"); this.lstWeekDays.Items.Add("Saturday"); this.lstWeekDays.Items.Add("Sunday"); } private void comboBox1_DropDown(object sender, EventArgs e) { lstWeekDays.Visible = true; } private void comboBox1_DropDownClosed(object sender, EventArgs e) { lstWeekDays.Visible = false; } </code></pre> <p>Add the checkboxes to this list instead of the panel.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload