Custom Cell Controls - what events cause them to move??
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
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
SIGN IN To post a reply.
3 Replies
AD
Administrator
Syncfusion Team
September 21, 2006 01:00 PM UTC
Hi Colin,
Sorry for the inconvenience caused.
We are looking into this issue and get back to you very soon.
Thanks for your patience.
Regards,
Haneef
Sorry for the inconvenience caused.
We are looking into this issue and get back to you very soon.
Thanks for your patience.
Regards,
Haneef
CB
Colin Bolton
September 21, 2006 04:54 PM UTC
Cool, thanks.
In my application I''ve tried putting the syncfusion on a plain old form and it works fine in this case. Sadly, after a convert from MFC to WinForms, there is no such thing as a simple form anymore and I suspect there''s an external message coming in to upset the table. Does this sound likely or am I looking at a blind alley??
Cheers!
Colin
In my application I''ve tried putting the syncfusion on a plain old form and it works fine in this case. Sadly, after a convert from MFC to WinForms, there is no such thing as a simple form anymore and I suspect there''s an external message coming in to upset the table. Does this sound likely or am I looking at a blind alley??
Cheers!
Colin
CO
Colin
September 22, 2006 02:37 PM UTC
Got it!!
Don''t hook anything into the syncfusion table''s onMouseEnter method, especially anything that gives the table focus as this messes things up.
Also if using the two control trick, do not re-initialise the active control in the onDraw event each time, do it once in the onActivated event and then leave it be.
Phew, that took a while to work out!
Don''t hook anything into the syncfusion table''s onMouseEnter method, especially anything that gives the table focus as this messes things up.
Also if using the two control trick, do not re-initialise the active control in the onDraw event each time, do it once in the onActivated event and then leave it be.
Phew, that took a while to work out!
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
CO Colin
- Sep 20, 2006 01:47 PM UTC
- Sep 22, 2006 02:37 PM UTC