VSPackage CustomEditor render/paint problem without "Windows XP" theme RRS feed

  • General discussion

  • Hi all,

    I'm implementing a VSPackage Custom Editor for Visual Studio 2008.
    My editor consists basically of a UI which inherit from UserControl in which i've got a DataGridView grid to display and allow editing of infos read from the opened file (a .xml file).

    DataGridView contains DataGridViewTextBoxColumn, DataGridViewComboBoxColumn, DataGridViewCheckBoxColumn, DataGridViewButtonColumn and two custom columns: DataGridViewDisabledButtonColumn and DataGridViewDisabledComboBoxColumn; these are custom column that inherit from DataGridViewButtonColumn or DataGridViewComboBoxColumn to give the editing control a better disabled look (i implemented them as here:

    Everithing worked well during debug and testing, but a problem comes after installation on user computer with Visual Studio 2008 and Windows Server 2003 and Windows Server 2003 R2.

    When I tried to open the file with custom editor, it is loaded but it has clear render / painting problems. DataGridView was unreadable and uneditable. Even triing with refresh or using scrollbar i can't get the right rendering.

    Then, I tried to install the editor on a computer with same configurations but with Windows Theme "Windows XP" set. For my great surprise, in that computer editor and DataGridView were rightly painted and usable!

    I put the same Windows Theme "Windows XP" in other computer and the problem disappeared.

    Changing theme (to "Windows Classic", for example) probleam appear.

    Note that the problem appear / disappear even keeping Visual Studio opened.

    What could be the cause?
    Is it a custom editor (or Visual Studio 2008 editor engine) problem?
    Could it be DataGridView problem?

    I don't know.

    Thanks for any suggestions.
    - Matteo Garzulino -
    Friday, September 18, 2009 10:58 AM

All replies

  • Hi, Matteo
    I do not think it is a the problem of custom editor. As far as I know, Microsoft has forked Windows common controls into two separate versions. Version 5 is available on all Windows versions from Windows 95 or later; it displays controls using a "3D chiseled" look. Version 6 became available with Windows XP and  under version 6, controls are rendered by a theme engine which matches the current Windows XP theme.
    So I think maybe you have used something that specific to the Windows XP theme. You can reference this link for using XP style controls.
    Hope this could help.
    Tuesday, September 22, 2009 12:36 PM
  • Hi,
    We are changing the issue type to “General Discussion” because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question” by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

    Thank you!

    Friday, September 25, 2009 9:38 AM