|
-
Sep 12th, 2000, 05:28 PM
#1
I have a MSHFlexgrid populated from a textarray loop and i have a total cell on the last row that calculates the above cells for each column. This is again calculated with a textarray statement in order that the focus isnt taken from the selected cell the user has chosen/moved to. I want to change the total cell color to red when a negative value is calculated. Specifying the row and col properties as a loop only takes the focus away. Helllllp
-
Sep 12th, 2000, 09:59 PM
#2
After populating the Grid, you can do something like this:
Code:
Dim intCol As Integer
With MSHFlexGrid1
For intCol = 0 To .Cols - 1
If Val(.TextMatrix(.Rows - 1, intCol)) < 0 Then
.Row = .Rows - 1
.Col = intCol
.CellForeColor = vbRed
End If
Next
End With
-
Sep 14th, 2000, 08:58 AM
#3
Yes this works but unfortunately the focus is taken away from the current cell after the function has executed. if a user enters a value into row 1 col 2 then moves with the right arrow to row 1 col 3 the function will run but the cell focus is now on row 4 col 32, the bottom right corner of the grid. How do return the focus to the users cell
-
Sep 14th, 2000, 09:22 AM
#4
You can memorize the position before you colorize cells and return to that cell after you colorize all cells.
-
Sep 15th, 2000, 05:04 AM
#5
Many Thanks, superb service
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|