ComboBox locked cell not grayed in V6.0.2005.2008

Posted by: ruehmer on 8 September 2017, 2:58 pm EST

  • Posted 8 September 2017, 2:58 pm EST

    <p>Hi,</p><p>I have a column with ComboBoxCelltype.  When I lock one cell, the ComboBox button does not get grayed out (only the mouse cursor changes). In V2 it worked.  Am I missing something?</p><p>Thanks,<br>Dany<br></p>
  • Replied 8 September 2017, 2:58 pm EST

    <p>Hello,</p><p>I am not sure why this behavior has been changed in the recent versions of Spread but you can achieve the same behavior by setting the VisualStyles property of Spread to off. When you set this property to off, the locked ComboboxCellTypes displays the grayed button in the cell, here is the line of code for the same:</p><p>                           fpSpread1.VisualStyles = FarPoint. Win.VisualStyles.Off;</p><p>You can set the VisualStyles to off for specific cells, rows, columns or sheets as required. Hope it will help you. Please let me know if you have any queries further.</p><p>Thanks,</p><p>Manpreet Kaur <br></p>
  • Replied 8 September 2017, 2:58 pm EST

    <p>Hi,</p><p>thank you, I figured<i> </i>out <i>that one</i> by myself.  But nevertheless the style is broken then.  We do not want to have mixed flat and 3D appearances (its rather ugly, esp. on Win7).</p><p>At the moment I'm a quite dissatisfied because of the changes in behavior between V2 and V6.  I do know that I had to expect at least <i>something </i>performing an upgrade from such a low version.  But breaking styles and event handling sequence is rather annoying.  Now I don't know if my decision to upgrade has been that wise, because I just wanted to get rid of the annoying flicker of the whole Form when the ComboBox drops down.  I spent now around one "man week" just to investigate these issues (an yes, they are issues for me).  <span id="result_box" class=""><span class="hps">In retrospect </span></span><span id="result_box" class=""><span class="hps">h</span></span><span id="result_box" class="">aving s</span>pent more than EUR 3,000 for the upgrade <span id="result_box" class=""><span class="hps"></span> <span class="hps"></span></span><span id="result_box" class=""><span class="hps"></span></span><span id="result_box" class=""><span class="hps">rather </span></span><span id="result_box" class=""><span class="hps"></span></span><span id="result_box" class=""><span class="hps">seems</span><span class="hps"> to </span></span><span id="result_box" class=""><span class="hps">be of no avail, or so I'm starting to believe.</span>   </span>Sorry. <img src="/emoticons/emotion-6.gif" alt="Sad" /></p><p>One request might be for GrapeCity to make at least the cell types available as source code that your customers can patch them to their needs.  I'm willing to make my own cell types when there is nothing available, but reinventing the standard types seems to be ridiculous.<br></p><p>Thanks anyway,<br>Dany<br></p>
  • Replied 8 September 2017, 2:58 pm EST

    <p>Hello,</p><p>Could you please elaborate what issue are you exactly facing with the sequence of events so that I can look into it further.</p><p>Thanks,</p><p>Manpreet Kaur <br></p>
  • Replied 8 September 2017, 2:58 pm EST

    <p>Hi Manpreet,</p><p>I think my claim has been premature and <span id="result_box" class="short_text"><span class="hps">as it turns out wrong.  My apologies for that (currently I'm under a lot of pressure to get it running...). <img src="/emoticons/emotion-10.gif" alt="Embarrassed" /><br></span></span></p><p>Would you please be so kind and ask your developers to integrate the (missing) disabled state of the ComboBox?  It's really easy since besides <font face="courier new,courier">System.Windows.Forms.VisualStyles.VisualStyleElement.ComboBox.DropDownButton.Normal</font> there is a <font face="courier new,courier">System.Windows.Forms.VisualStyles.VisualStyleElement.ComboBox.DropDownButton.Disabled</font> that can be used in the <font face="courier new,courier">Paint </font>method when <font face="courier new,courier">isLocked </font>is <font face="courier new,courier">true</font>. <img src="/emoticons/emotion-5.gif" alt="Wink" /></p><p>Otherwise this would be the only option (theming active) which has no proper locked state (turning theming off works as you said, but is ugly in comparison).</p><p>Thanks,<br>Dany<br></p>
  • Replied 8 September 2017, 2:58 pm EST

    <p>This is default behavior when locking a single cell with a ComboBoxCellType, to get around this you would need to create a custom celltype extending ComboBoxCellType and override the paintell method putting code like this in it.<font color="#0000ff" size="2"></font></p><font color="#0000ff" size="2"><p><span style="font-size:10pt;">If</span><span style="font-size:10pt;"><font color="#000000"> isLocked = </font><span style="color:blue;">False</span><font color="#000000"> </font><span style="color:blue;">Then</span></span></p><p><span style="font-size:10pt;"><font color="#000000"><span style="mso-tab-count:1;">      </span>ControlPaint.DrawComboButton(g, </font></span></p><p><span style="font-size:10pt;"><span style="mso-tab-count:1;">      </span>New</span><span style="font-size:10pt;"><font color="#000000"> Rectangle(r.Right - 17, r.Y, 17, r.Height),
    ButtonState.Normal)</font></span></p><p><span style="font-size:10pt;">Else</span></p><p><span style="font-size:10pt;"><font color="#000000"><span style="mso-tab-count:1;">      </span>ControlPaint.DrawComboButton(g, </font></span></p><p><span style="font-size:10pt;"><span style="mso-tab-count:1;">      </span>New</span><span style="font-size:10pt;"><font color="#000000"> Rectangle(r.Right - 17, r.Y, 17, r.Height),
    ButtonState.Inactive)</font></span></p><p><span style="font-size:10pt;">End</span><span style="font-size:10pt;"><font color="#000000"> </font><span style="color:blue;">If</span><o:p></o:p></span></p><p><font color="#000000" size="3" face="Times New Roman">

    </font></p></font>
  • Replied 8 September 2017, 2:58 pm EST

    <BLOCKQUOTE><div><img src="/wp-content/uploads/CS_images/icon-quote.gif"> paul1960:</div><div><p>This is default behavior when locking a single cell with a ComboBoxCellType, ...<span style="font-family:'Lucida Console';font-size:10pt;"><span style="color:blue;"></span></span></p><p><font color="#0000ff" size="2"></font></p><p><font color="#0000ff" size="2"><font color="#000000" face="Times New Roman" size="3">

    </font></font></p></div></BLOCKQUOTE><p> </p><p>Hi,</p><p>since when?  It has not been so in V2.  Why has this been changed?</p><p><b>Edit:</b><br> And your solution is quite a joke or are you really serious?  What do I want with an old-style Win2000 3D button?  Sorry, but this is something I can not tolerate.  Why breaking running code which is kind of "state of the art"?<br></p><p> </p><p>Thanks,<br>Dany<br></p>
  • Replied 8 September 2017, 2:58 pm EST

    <p>Hello,</p><p>I have entered a feature request to gray the drop down button for a locked ComboBoxCellType and the request id for the same is <span class="dlgtitle">#99926293 for the future releases of Spread. Currently, you would need to set the VisualStyles property to off to achieve the desired behavior. I would suggest to set the VisualStyles off only for the particular cell having the ComboBoxCellTYpe as it would preserve the remaining styles on the sheet.</span></p><p>Hope it will help you. Please let me know if you have any queries further.</p><p>Thanks,</p><p>Manpreet Kaur <br></p>
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels