CustomView background colour

  1. 5 years ago

    Joel_Eisenstat

    14 Jan 2019 User since 2016

    Good morning,
    I am having difficulty in assigning a background colour to a CustomView for a computed property. Any direction is appreciated.
    Code snippet;
    get {
    return _procolour;
    }

    set {
    _procolour = value; // value = procedure text value

    func onSuccess(db,rs){

    var p = rs.colour; // hex colour
    if ( p == null ) {
    p = "000000FF"; // change null to clear (else runtime error)
    }

    Calendar.View2.TableView1.Cell1.CustomView6.alpha = 0.25;
    Calendar.View2.TableView1.Cell1.CustomView6.backgroundColor = p; // fails no change - F10000FF

    }
    func onError(db){

    }

    var sql = 'SELECT * FROM "Calendar_Procedures" WHERE "name" = $$\(_procolour)$$';
    PostgreSQL1.select(sql, onSuccess, onError);
    }

  2. Joel_Eisenstat

    15 Jan 2019 User since 2016

    Got it - CustomView6.backgroundColor = p -- works

or Sign Up to reply!