CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Deploying Windows Server 2008 with System Center
  • Remote Desktop Protocol Performance Improvements in Windows Server 2008 R2 and Windows 7
  • The Microsoft Dynamics CRM Security Model
  • SQL Server Modeling Services with Microsoft Visual Studio 2010 Beta 2

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Visual Basic 6.0 Programming
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Visual Basic 6.0 Programming Ask questions about VB 6.0 (or earlier versions) or help others by answering their question.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old November 8th, 2009, 09:58 AM
    George1111 George1111 is offline
    Senior Member
     
    Join Date: Aug 2003
    Location: Sydney, Australia
    Posts: 1,748
    George1111 is a glorious beacon of light (400+) George1111 is a glorious beacon of light (400+) George1111 is a glorious beacon of light (400+) George1111 is a glorious beacon of light (400+) George1111 is a glorious beacon of light (400+) George1111 is a glorious beacon of light (400+)
    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) ?
    Reply With Quote
      #2    
    Old November 8th, 2009, 10:26 AM
    ggeu ggeu is offline
    Junior Member
     
    Join Date: Oct 2009
    Posts: 12
    ggeu is on a distinguished road (10+)
    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,
    Attached Files
    File Type: zip Dont select empty cell in Flexgrid.zip (1.4 KB, 16 views)
    Reply With Quote
      #3    
    Old November 8th, 2009, 06:17 PM
    George1111 George1111 is offline
    Senior Member
     
    Join Date: Aug 2003
    Location: Sydney, Australia
    Posts: 1,748
    George1111 is a glorious beacon of light (400+) George1111 is a glorious beacon of light (400+) George1111 is a glorious beacon of light (400+) George1111 is a glorious beacon of light (400+) George1111 is a glorious beacon of light (400+) George1111 is a glorious beacon of light (400+)
    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)
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Visual Basic 6.0 Programming


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 01:41 PM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.