|
-
Jun 15th, 2006, 08:48 AM
#1
Thread Starter
New Member
Assigning color to cell on grid.
Hi all,
I have this code.
VB Code:
For i = 0 To grdDiary.Rows - 1
' Selects the disired row.
grdDiary.Row = i
' Sets the text on the row
grdDiary.Text = DateAdd("d", i - 1, sMonth)
' If the text on the row is the same as todays date
If grdDiary.Text = CStr(DateTime.Date) Then
' ????
Else
' ????
End If
Next i
Basically the loop will run through each row setting every date in the month on the left column, what I want it to do is when it finds todays date, highlight it in some way.
The text cannot change, but it can change color or I could place an picture behind it. I just want the cell to be highlighted, not the row.
its a standard vb6 grid.
Any ideas?
Many thanks in advance...
Mark
-
Jun 15th, 2006, 08:51 AM
#2
Frenzied Member
Re: Assigning color to cell on grid.
 Originally Posted by juniorCoder001
its a standard vb6 grid.
Welcome 
There are a number of grids: MSFlexGrid, MSHFlexGrid, Grid, which one are you using?
Beantown Boy
Please use [highlight=vb]your code goes in here[/highlight] tags when posting code.
When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
-
Jun 15th, 2006, 09:42 AM
#3
Thread Starter
New Member
Re: Assigning color to cell on grid.
-
Jun 16th, 2006, 03:20 AM
#4
Thread Starter
New Member
Re: Assigning color to cell on grid.
Does anyone have any ideas?
-
Jun 16th, 2006, 03:47 AM
#5
Re: Assigning color to cell on grid.
Do U Want To Cahnge The Grid Cell Colour
-
Jun 16th, 2006, 05:26 AM
#6
Thread Starter
New Member
Re: Assigning color to cell on grid.
Yeah, basically its a grid that has a column of dates down the left hand side and there are as many rows as there are dates in a particular month, then along the top is the amount of days in the month.
Its for assigning work to employees, however the users want the cell that holds the current date (down the lefthand side) to be highlighted in some way, so a different color would work fine.
I'm a little stuck on this...
-
Jun 16th, 2006, 06:07 AM
#7
Re: Assigning color to cell on grid.
For changing u can use VSFlexGrid from Here It is batter then grid
http://www.softlookup.com/windows/
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
|