Alpha Video Training
Results 1 to 2 of 2

Thread: Changing a field color in the web app

  1. #1
    Member
    Real Name
    Roelof
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    763

    Default Changing a field color in the web app

    I have 2 fields,
    - Field One charater has project name
    - Field Two character, has 3 options 1,2 and 3 (drop down)

    I would like field one to change color when a person changes the settings in field 2 in a web app, is that possible. It is very easy in Alpha5 app itself, but I would like it to work in the web app.

    Thanks

  2. #2
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,595

    Default Re: Changing a field color in the web app

    Yes. To do this, use a custom control. Here's an example definition for a field that is Red/ Yellow / Green based on status. The picture shows the result.

    Code:
     
    function ICA_Status_render as c (data as p, args as p, PageVars as p)
    with PageVars
    on error goto ICA_Status_xbasicError
    select
        case data.ICA_Status = "Complete"
      ICA_Status_render = <<%html%
      <div style="background-color:#008000;color:#ffffff;">Complete <br>%html%+Data.ICA_By+"</div>"
     case data.ICA_Status = "Urgent"
      ICA_Status_render = <<%html%
      <div style="background-color:#ffff00;color:#000000;">Urgent <br>%html%+Data.ICA_BY+"</div>"
     case data.ICA_Status = "Overdue"
      ICA_Status_render = <<%html%
      <div style="background-color:#ff0000;color:#ffffff;">Overdue <br>%html%+Data.ICA_BY+"</div>"
    end select
    end
    ICA_Status_xbasicError:
    ICA_Status_render = "Error in custom control xbasic: " + error_text_get()
    end with
    end function

Similar Threads

  1. Desinging a field to change color in a we app.
    By Atta in forum Alpha Five Version 9 - Desktop Applications
    Replies: 1
    Last Post: 11-22-2008, 06:10 PM
  2. Web app how set Logical field
    By daswunder in forum Application Server Version 9 - Web/Browser Applications
    Replies: 0
    Last Post: 11-15-2008, 05:29 AM
  3. Changing Scrollbar Color of Objects
    By Kai Lange in forum Archived Wishlist
    Replies: 0
    Last Post: 01-23-2005, 07:13 AM
  4. Changing color on font in Checkboxes
    By Inge Hansen in forum Alpha Five Version 5
    Replies: 7
    Last Post: 07-07-2004, 11:41 AM
  5. Color changing font
    By nick marodis in forum Alpha Five Version 4
    Replies: 5
    Last Post: 07-21-2000, 04:57 AM

Bookmarks

Posting Permissions

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