Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3455
Cell becomes empty in Vista
posted

Hi,

I have an issue while working in Vista OS.

Problem

When the Active cell is navigated using arrow keys, the cell become white, i.e., the content in cell is not visible. In Windows Xp there is no such issue seen.

I am attaching a project with this mail so that the issue can be understood clearly.

Steps to follow in Vista

1.       First click a cell using mouse (Now the row will be selected).

2.       Press Tab key, now the next cell become active.

3.       Press any arrow key.

Now the active cell will be empty.

Note:- I have implemented IUIElementDrawFilter  interface to avoid the active row. If I am not implementing this interface then I have to set the active row appearance as white, but this makes problem when the row is both active and selected.

 

Please suggest me any solution for this.

Regards,

Ceaser

TestGrid.zip
Parents
No Data
Reply
  • 469350
    Offline posted

    When you press the tab key, the cell you tab to becomes the ActiveCell. This is okay, because there is no ActiveCellAppearance applied to the grid, so the ForeColor of the cell does not change. 

    When you use the arrow key, the cell becomes both Active and Selected. The selected cell uses the system highlight color, which happens to be white. So you get white text on a white background - since your drawfilter it making the background white. 

    You will need to use a DrawFilter to change the ForeColor of the cell, as well as the BackColor.

    HOWTO:How can I have Selected cells in a grid maintain their forecolor?

Children
No Data