I am using a custom cell in a grid and I am wondering when the controls used to render the cells are moved.
To demonstrate the problem I have attached an example project of what I am trying to do. There are two cells with my custom control in. Clicking on one of them will display a drop down list. With the list displayed I want to be able to click on the second and see the drop down list of the first dissappear and the drop down list for the second appear in the right place.
I have copied the implementation found in the calendar example and have one active control and one control to paint the inactive cells.
In this example this is what happens but when I use this in my application strange things occur. The attached project prints to the debug window when things happen and we see the following:
X = -1000
Y = -1000
on activate 2 3
painting the combo box control Click here!
X = 300
Y = 38
painting the combo box control Click here!
painting the combo box control Click here!
painting the item Folder
painting the item Folder
painting the item Folder
the active control is moved to -1000,-1000. The cell is activated, the active contrl is move to the correct position, the ''Click Here!'' is painted, the folder menu items are painted.
This is good. However, using the same code in a large application I get the following output:
X = -1000
Y = -1000
on activate 2 2
X = 100
Y = 38
painting the combo box control Click here!
painting the combo box control Click here!
X = -1000 **********
Y = -1000 **********
painting the menu item stored value Folder
painting the menu item stored value Folder
painting the menu item stored value Folder
X = 100
Y = 38
painting the combo box control Click here!
It is the two lines with ****** that confuse me. The active control is moved to -1000,-1000 while the folder menu items are painted and then returned back to correct position. Obviously this does not look good!
My question is what can possibly trigger this to happen. The design of the product is complex and it is likely there are some events and messages being fired that I can''t see but I can not work out what would cause the active control to be moved like this.
Any ideas?????
Colin
comboMenu.zip