| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Visual Basic 6.0 Programming Ask questions about VB 6.0 (or earlier versions) or help others by answering their question. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to NOT Select last Row of MSHFlexGrid
I have had trouble where a user clicks on the empty space below the last row of a MSHFlexGrid
This has the same effect as clicking on the actual last row of the grid Is there a way to detect the click was in the empty space (rather than on the actual last row) ? |
|
#2
|
|||
|
|||
|
Re: How to NOT Select last Row of MSHFlexGrid
dear,
First: is an empty row on the end of the gris normal? code OK ? second : you can check if there is an empty cell selected like this: create a form with a MSFlexgrid and enter the code= =========================================== Private Sub Form_Load() Dim i As Integer '§ populate the grid With MSFlexGrid1 .FixedCols = 0 .FixedRows = 0 .Cols = 1 .Rows = 1 For i = 1 To 10 .AddItem i, i Next .AddItem "", 11 End With End Sub Private Sub MSFlexGrid1_Click() If MSFlexGrid1.Text = "" Then MsgBox ("Select other cell") Else MsgBox ("This is OK => enter here the code to proceed.....") End If End Sub ================================================= See also attachment. br, |
|
#3
|
|||
|
|||
|
Re: How to NOT Select last Row of MSHFlexGrid
There is no empty row to test - thats the problem
It just selects the last row when you click in the blank area under all the rows which are full of data You have given me an idea though - the worst case is that I add a blank row to the grid, which will then give me something to test for (Rather not do this if possible) |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|