Change Font color in GridView
Posted
#1
(In Topic #2046)
Enthusiast

How can I change a colums font color
Hello all,I hope someone smarter then myself can help.
I am using the following code to change the background of a Column as needed
Code
If TotalOfDay > 0 Then
If TotalOfDay > global.TotalDailyTarget Then
frmDashBoard.GridViewLast7Days.Columns[(i - 1)].Background = Color.green
Else If TotalOfDay = global.TotalDailyTarget Then
frmDashBoard.GridViewLast7Days.Columns[(i - 1)].Background = Color.Orange
Else If TotalOfDay >= AllowedGapValue And TotalOfDay <= global.TotalDailyTarget Then
frmDashBoard.GridViewLast7Days.Columns[(i - 1)].Background = Color.Yellow
Else
frmDashBoard.GridViewLast7Days.Columns[(i - 1)].Background = Color.red
End If
Else
frmDashBoard.GridViewLast7Days.Columns[(i - 1)].Background = Color.white
End If
if someone would be as kind to show me how I can change the font color I would be most greatful.
Kind Regards
Andy
Posted
Expert


Does the format
Gridview[RowNo , ColumnNo].Foreground = Color.Red
not work ?
This works for me with Gambas 3.21.3 on Linux Mint 22.3
Cheers - Quin.
I code therefore I am
I code therefore I am
1 guest and 0 members have just viewed this.



