I hit a dead end on my previous post so I thought I would simplify things and first get the sample in the help under Web Framework 18.0 to produce colours and go from there.
That did not work. I got no colours other than the standard default foreground and background colours.
A snip of the resulting screen is attached as NoColours.gif.
Any thoughts would be appreciated.
DF 19.1
Thanks!
Archie
Here is my code.
Code:
// TestColours.wo
Use cWebView.pkg
Use cWebPanel.pkg
Use cWebForm.pkg
Use cpblPgaDataDictionary.dd
Use cWebColumn.pkg
Object oTestColours is a cWebView
Object opblPga_DD is a cpblPgaDataDictionary
End_Object
Set Main_DD to opblPga_DD
Set Server to opblPga_DD
Set piWidth to 700
Set psCaption to "TestColours"
Procedure OnLoad
Send Find of opblPga_DD FIRST_RECORD 1
End_Procedure
Object oWebMainPanel is a cWebPanel
Set piColumnCount to 12
Object oWebList1 is a cWebList
Object opblPga_Code_Num is a cWebColumn
Entry_Item pblPga.Code_Num
Set psCaption to "PGA Code Num"
Set piWidth to 50
End_Object
Object opbl_Pga_Title is a cWebColumn
Entry_Item pblPga.Title
Set psCaption to "PGA Title"
Set piWidth to 50
Set psCSSClass to "DemoColumnTitle"
End_Object
Procedure OnDefineRowCssClass String ByRef sCSSClass
String s1
Forward Send OnDefineRowCssClass (&sCSSClass)
Move (Left(pblPga.Title, 1)) to s1
If (s1 < "G") Move "DemoRowLow" to sCSSClass // Red
Else If (s1 > "T") Move "DemoRowHigh" to sCSSClass // Green
Else Move "DemoRowMedium" to sCSSClass // Orange
End_Procedure
End_Object
End_Object
End_Object
Note: Using Debug I determined that OnDefineRowCssClass does not get called.
Here is my application.css in AppHtml\CssStyle
Code:
#OWEBAPP .DemoRowLow .DemoColumnTitle{
background-color: red;
}
#OWEBAPP .DemoRowMedium .DemoColumnTitle{
background-color: orange;
}
#OWEBAPP .DemoRowHigh .DemoColumnTitle{
background-color: green;
}