Re: Row and Col property of MSHFlexGrid



"Ella" <ellakayeekwan@xxxxxxxxx> wrote in message
news:1144355750.118709.150950@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi everyone,

I have posted this problem before. However, nobody answer. I want to
try again. Hope someone can help.

Below is the explaination of my problem:


I cannot trigger the RowColChange event when clicking on the first row
on the grid.

Is that first row a Fixed row? If so, use the MouseRow and MouseCol
properties.

'=====
Option Explicit

Private Sub Form_Load()
MSHFlexGrid1.FocusRect = flexFocusHeavy 'Thick focus rectangle
End Sub

Private Sub MSHFlexGrid1_Click()

With MSHFlexGrid1
Debug.Print .Row, .Col, .MouseRow, .MouseCol
End With

End Sub
'=====

When the application is loaded, the DataSource of both grids is set .


For the first table, if I click on the first row, no dialog pops up.
Click the second rows, it works. Click the first row again, it works.

Add some Debug.Print s to help you diagnose the problem.


For the second table, if I click on the either the first or second
rows, no dialog pop up. If I click on the third, dialog pops up with
the "data" of the second row. If I click the fourth row, I get the
second row data. Now, I can click on the second row to get the first
row data. However, if I click the scroll bar, everything works
correctly. First row is first row. Second row is second.

I wouldn't know where to start when it comes to trying to reproduce that
problem here. Debug.Print everywhere.

Also in one of the grid, I don't see the "square" on the active cell

See the grids FocusRect property

displayed on the grid. Why is that? How to set the default "square" to
a specific place?

Set the grids Row and Col properties. When the grid has focus, that square
should show up.

Thank you very much
Ella



--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm


.



Relevant Pages

  • RowColChange event of MSHFlexGrid
    ... for modifing the data of a row on the grid. ... For the first table, if I click on the first row, no dialog pops up. ... the "data" of the second row. ... second row data. ...
    (microsoft.public.vb.controls)
  • Row and Col property of MSHFlexGrid
    ... for modifing the data of a row on the grid. ... For the first table, if I click on the first row, no dialog pops up. ... the "data" of the second row. ... Also in one of the grid, I don't see the "square" on the active cell ...
    (microsoft.public.vb.controls)
  • Re: how to average two different lines
    ... The first row average will be a true average of three numbers for example ... By giving the second row the same importance as the first row you do not get ... row, then I bring them to a report, the report will sum the two average ...
    (microsoft.public.excel.misc)
  • txt2xls
    ... This should go in the first row, ... first column. ... This should go in the second row, ... This should go in the third row, ...
    (comp.lang.python)
  • Re: txt2xls
    ... > This should go in the first row, ... > first column. ... > This should go in the second row, ... > This should go in the third row, ...
    (comp.lang.python)