Highlight cel in xbrowse when xbrowse is allready running

Highlight cel in xbrowse when xbrowse is allready running

Postby Marc Venken » Fri Feb 19, 2021 4:14 pm

I looking for a way to highlight a cel in xbrowse on the fly (when running the program)

like most of us i use code like this :

Code: Select all  Expand view

function showcolors(cVeld)
  local cKleur:=""
  local aColorPairs := { ;
  { CLR_BLACK, MY_LIGHTGREEN },;  //1
  { CLR_BLACK, MY_GREEN},;        //2
  { CLR_BLACK, MY_PAARS},;        //3
  { CLR_BLACK, MY_LIGHTYELLOW },; //4
  { CLR_BLACK, MY_YELLOW },;       //5
  { CLR_WHITE, CLR_HRED },;       //6
  { CLR_BLACK, CLR_WHITE },;       //7
  { CLR_WHITE, CLR_BLUE },;       //8
  { CLR_WHITE, CLR_HGREEN },;       //9
  { CLR_WHITE, CLR_HBLUE }}       //10


  do case
    case mailbulk->yml_open > 0 .and. mailbulk->nomails
       cKleur = aColorPairs[10]
    case mailbulk->yml_open > 0 .or. left(mailbulk->mailset,4) = "Open"
       cKleur = aColorPairs[8]
    case mailbulk->optout .or. mailbulk->bounced .or. mailbulk->nomails
       cKleur = aColorPairs[6]
    case !empty(mailbulk->mailset)
       cKleur = aColorPairs[9]
    case empty(mailbulk->mailset) .and. mailbulk->yml_open > 0 .and. mailbulk->yml_send > 0
       cKleur = aColorPairs[5]
    case empty(mailbulk->mailset) .and. mailbulk->yml_send = 0
       cKleur = aColorPairs[5]
    case empty(mailbulk->mailset) .and. mailbulk->yml_bounce > 0
       cKleur = aColorPairs[3]
    case upper(left(cVeld,6)) = "MAVECO"
       cKleur = aColorPairs[2]
    case left(cVeld,4) = "Pers"
       cKleur = aColorPairs[2]
    case cVeld = "YMLP"
       cKleur = aColorPairs[3]
    case left(cVeld,6) = "ONLINE"
       cKleur = aColorPairs[4]
    otherwise
       cKleur = aColorPairs[7]
  endcase
return cKleur

 


but this need to be changed in code every time for a new setting :

Can this be done like this ? A xbrowse that I popup in order to let it changes the combinations

Cel Colorset Condition

email { CLR_BLACK, MY_LIGHTGREEN } if data->active .and. data->online .and. data->count > 5
send { CLR_BLACK, MY_LIGHTGREEN } if.... etc...

How can I tell the active xbrowse to start using the selected conditions ?
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1429
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Highlight cel in xbrowse when xbrowse is allready running

Postby nageswaragunupudi » Sat Feb 20, 2021 3:15 am

For the entire browse:
Code: Select all  Expand view

oBrw:bClrStd := { || ShowColors( cVield ) }
 


or

For a specified column
Code: Select all  Expand view

oBrw:email:bClrStd := { || If( <cond1>, clrPair1, If( <cond2>, clrPair2, ... ) ) }
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 44 guests