Results 1 to 10 of 16

Thread: cWebList Row colours attempt #2

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Edmonton Canada
    Posts
    916

    Default cWebList Row colours attempt #2

    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;   
    }
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	NoColours.gif 
Views:	31 
Size:	66.3 KB 
ID:	15573  
    Last edited by ArchieCampbell; 2-Aug-2022 at 11:07 PM. Reason: Coding error. Same result.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •