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

    Hi,

    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?

    Thanks,
    Dany

  • Replied 8 September 2017, 2:58 pm EST

    Hello,

    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:

                               fpSpread1.VisualStyles = FarPoint. Win.VisualStyles.Off;

    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.

    Thanks,

    Manpreet Kaur

  • Replied 8 September 2017, 2:58 pm EST

    Hi,

    thank you, I figured out that one 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).

    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 something 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).  In retrospect having spent more than EUR 3,000 for the upgrade rather seems to be of no avail, or so I'm starting to believe.   Sorry. Sad

    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.

    Thanks anyway,
    Dany

  • Replied 8 September 2017, 2:58 pm EST

    Hello,

    Could you please elaborate what issue are you exactly facing with the sequence of events so that I can look into it further.

    Thanks,

    Manpreet Kaur

  • Replied 8 September 2017, 2:58 pm EST

    Hi Manpreet,

    I think my claim has been premature and as it turns out wrong.  My apologies for that (currently I'm under a lot of pressure to get it running...). Embarrassed

    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 System.Windows.Forms.VisualStyles.VisualStyleElement.ComboBox.DropDownButton.Normal there is a System.Windows.Forms.VisualStyles.VisualStyleElement.ComboBox.DropDownButton.Disabled that can be used in the Paint method when isLocked is true. Wink

    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).

    Thanks,
    Dany

  • Replied 8 September 2017, 2:58 pm EST

    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.

    If isLocked = False Then

          ControlPaint.DrawComboButton(g,

          New Rectangle(r.Right - 17, r.Y, 17, r.Height),
    ButtonState.Normal)

    Else

          ControlPaint.DrawComboButton(g,

          New Rectangle(r.Right - 17, r.Y, 17, r.Height),
    ButtonState.Inactive)

    End If



  • Replied 8 September 2017, 2:58 pm EST

    paul1960:

    This is default behavior when locking a single cell with a ComboBoxCellType, ...



     

    Hi,

    since when?  It has not been so in V2.  Why has this been changed?

    Edit:
    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"?

     

    Thanks,
    Dany

  • Replied 8 September 2017, 2:58 pm EST

    Hello,

    I have entered a feature request to gray the drop down button for a locked ComboBoxCellType and the request id for the same is #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.

    Hope it will help you. Please let me know if you have any queries further.

    Thanks,

    Manpreet Kaur

Need extra support?

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

Learn More

Forum Channels