I have a virtual grid control and the celltype is set to ComboBox and DerivedComboBox. I set an image to the cell,
I want to know if the click is over the image when user clicks the cell. I used e.IsOverImage. It always returns false even though I am clicking on the image. Is this a bug and can you
suggest a workaround?
ADAdministrator Syncfusion Team February 28, 2005 06:03 PM
IsOverImage only applies to a Static celltyle where style.ImageIndex and style.ImageList is used to set the image into the cell. Here is the class reference entry on this property.
/// Indicates if the mouse was over an image (see cref="GridStyleInfo.ImageIndex")
/// in a static cell when the mouse was released.
How are you putting teh image into your combobox? Do you know a relative rectangle in the cell where teh image is being drawn? If so, you can see if the click point is in this releative rectangle offset by the top-left corner of teh cell which you can get from a call to grid.ViewLayout.RowColToPoint.
DLDongxian LiMarch 1, 2005 10:05 AM
I set the ImageList and ImageIndex of the ComboBox. Since I know the size of the image so
I am able to get if the click is within the image rectangle using the RowColToPoint() method.
But it would be so much better if IsOverImage is set to true by the grid automatically since the property is already there. Can this be an enhancement in the future?
ADAdministrator Syncfusion Team March 1, 2005 11:22 AM
Yes. This has been entered as defect #72 in our Open Issues database.