Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MSFlexGrid is highlighting the first cell

Posted on 2002-04-06
2
Medium Priority
?
398 Views
Last Modified: 2008-02-01
I have an aggravating problem.....  

  My MSFlexGrid is working fine but when it loads the very first cell is highlighted.  I don't understand how or why it does this because I have

  MSFlexGrid1.SelectionMode = flexSelectionRow

 And when you mouse click on that first row it behaves normally by highlighting the entire row.

I've also added:

     .FocusRect = flexFocusNone
     .FillStyle = flexFillRepeat
     .Clear

  all to no avail.....  

     .RowSel = 0

 causes the first cell in the header row AND the first cell in the data row to highlight.

 * What is causing this first cell to highlight?
 * How can a clear the highlighting on this flexgrid so that nothing is highlighted?
 * How do I programmatically highlight a particular row?
0
Comment
Question by:EasyAim
2 Comments
 
LVL 5

Accepted Solution

by:
KarcOrigin earned 220 total points
ID: 6927559
Hi EasyAim,

Can I give you my idea -

Remove everything and try this. On the Form_Load event add this

' This will free MSFlexGrid1 with any selection mode
Private Sub Form_Load()
    MSFlexGrid1.SelectionMode = flexSelectionFree
End Sub

' This will select you whole row when you click on a perticular row on the MSFlexGrid

Private Sub MSFlexGrid1_Click()
    With MSFlexGrid1
        .RowSel = .Row
        .Col = 0
        .ColSel = .Cols - 1
    End With
End Sub

I wish this helps you!
Thanks
0
 

Author Comment

by:EasyAim
ID: 6957736
I haven't forgotten about you....  I haven't had a chance to get back to this project.  I'll give your proposal a try soon.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question