NetTalk Central

Author Topic: NetWebBrowse individual row/col color from clarion color code  (Read 4643 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Hi, one of the columns of the browse is STATUS and each status has an idividual color set bye a win32 clarion app, the color is saved from clarion as a long.
I need to set that color in each row in the status column depending on the status.

Then... how to tranlate the long color to a web color class

Thanks
« Last Edit: May 24, 2019, 11:22:54 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetWebBrowse individual row/col color from clarion color code
« Reply #1 on: May 26, 2019, 10:07:00 PM »
>> how to translate the long color to a web color class

p_web.ColorToWeb(color) which uses StringTheory.ColorToHex(color,true)

From the StringTheory docs,
! takes in a color in Clarion or Web (#abcdef , #FFF, name) format and returns the color in web format.

so you can pass in a clarion long, #aaa, #aaaaaa, or "colorname" (like 'red','green',cornflowerblue' and so on and you'll get back the #aaa form of the color.

>>  each status has an individual color

so you want to set this on a cell-by-cell basis. So for the column, go to the CSS tab.
There in "additional CSS properties" you can set;
Css Property: background-color
Value: Cus:Color
(the call to ColorToWeb will be done for you.)

cheers
Bruce



Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NetWebBrowse individual row/col color from clarion color code
« Reply #2 on: May 27, 2019, 06:53:26 AM »
There in "additional CSS properties" you can set;
Css Property: background-color
Value: Cus:Color
""""(the call to ColorToWeb will be done for you.)""""

Super! Thanks

-----------
Regards
Alberto