Solved

MSFlexGrid is highlighting the first cell

Posted on 2002-04-06
2
356 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 55 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

776 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