I'm working with a MSFlexGrid control in VB6, but I'm also having some problems retrieving the ColPos property for merged columns. The grid that I've generated looks something like this:
-----------------------------
| 8/17/2010 |
-----------------------------
| Column 1 | Column 2 |
-----------------------------
The first row is fixed and the two columns are merged, so both columns contain 8/17/2010 in the first row.
During the Click event, I'm positioning a text box over a cell in the second row, and when I set its Left and Top properties using the FlexGrid's ColPos and RowPos properties, I end up with the textbox positioned over column 1. This happens even if I clicked in column 2.
I've checked the Col property, and it's correctly set to 2 after clicking in the second column, but ColPos(1) and ColPos(2) both return the same value, which is the distance from column 1's left edge to the left edge of the control.
When merging is disabled on the flexgrid, the problem goes away, but I'd rather leave it on since it makes the grid a bit more readable.
Is there any way to retrieve the correct position of the selected column when another cell in the column is merged with another one, or do I need to calculate the column position manually?