Solved

MSFlexGrid is highlighting the first cell

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JSON Response and request in VB6 application 11 239
MS Date Picker 64 bit 32 bit issue 12 49
SLMGR Switches Are Not Working On KMS Host 3 63
Child Form in front 4 37
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now