topic
stringlengths
1
63
text
stringlengths
1
577k
Colores en los gets como?
Saludos foro. A sugerencia de la mayoria de los usuarios que usan las aplicaciones desarrolladas, exigen ver de forma diferente los gets en edicion, cuando estos estan OGet:Enable() y editandose si me acepta colores definidos en: oget:nClrFore oget:nClrBack o oget:SetColor(...) pero como podre desplegar los gets con los colores deseados si tan solo estoy consultado y no editando? Alguna sugerencia.
Colores en los gets como?
al inicio de mi app pong esto: [code=fw:zxset38g]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />   SetKinetic<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span><br />   SetDialogEsc<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span><br />   SetGetColorFocus<span style="color: #000000;">&#40;</span> CLR_MENTA <span style="color: #000000;">&#41;</span><br /><br />   WITH OBJECT tGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">lDisColors</span>  := <span style="color: #00C800;">FALSE</span><br />      :<span style="color: #000000;">nClrTextDis</span> := CLR_BLUE<br />      :<span style="color: #000000;">nClrPaneDis</span> := CLR_SOFTYELLOW<br />   END<br />...<br /> </div>[/code:zxset38g] y que modificar tget de esta forma [code=fw:zxset38g]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />   <span style="color: #B900B9;">//DATA   nClrTextDis, nClrPaneDis                 //comentar esta linea</span><br />...<br />   CLASSDATA nClrTextDis, nClrPaneDis             <span style="color: #B900B9;">//agregar esta linea</span><br />..<br /> </div>[/code:zxset38g] en el metodo redefine hay que comentar estas lineas [code=fw:zxset38g]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//   ::nClrTextDis = nClrFore</span><br /><span style="color: #B900B9;">//   ::nClrPaneDis = nClrBack</span><br /> </div>[/code:zxset38g] ahora cada get que tenga WHEN .F. saldra con el color azul sobre un amarillo tenue salu2
Colores en los gets como?
Noe Colocar este código en el principal y todos los Gets en edición tendrán en color [code=fw:2b4lgxln]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> SetGetColorFocus<span style="color: #000000;">&#40;</span>RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">238</span>,<span style="color: #000000;">232</span>,<span style="color: #000000;">170</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:2b4lgxln] Saludos, Adhemar
Colores en los gets como?
Carlos: Esto me funciona para cambiar los colores de los gets en general, y esta bien, asi los puedo modificar WITH OBJECT tGet() :lDisColors := .F. :nClrTextDis := COLOR_AZUL :nClrPaneDis := COLOR_SAMARILLO END El detalle aqui, es: Como indicar el color del get en particular, que no todos tengan el mismo color de texto y fondo, solo algunos con colores definidos para cada get. Esa es mi cuestion. y es que tengo una proceso algo asi: @ 02,02 COLUART(1) "art->pre_inv" no modificar formato "@!"; id 102 titulo 'Prefijo ' long {8,1,oFontPza} color {COLOR_AZUL,COLOR_SAMARILLO} @ 02,32 COLUART(1) "art->bas_inv" formato "@!" requerido; id 103 titulo 'Basico ' long {8,1,oFontPza} color {COLOR_NEGRO,COLOR_SAMARILLO} @ 02,59 COLUART(1) "art->suf_inv" formato "@!"; id 104 titulo 'Sufijo ' long {6,1,oFontPza} color {COLOR_NEGRO,COLOR_SAMARILLO} @ 01,32 COLUART(1) "art->des_inv" formato "@!S36" requerido; id 105 titulo 'Descripci¢n' color COLOR_ROJO
Colores en un LIstBox
Como puedo hacer para que un Listbox (con o sin datos) se pongan de colores verde y blanco como las antiguas hojas pautadas de impresion, es decir un renglon verde, uno blanco, uno verde uno blanco, sin importar que este vacia la base de datos. gracias y saludos a todos
Colores en un LIstBox
Amigo... Asi se cambian los colores... lo que no se es cuando la base de datos esta vacia.. oBrw:NCLRPANE:={||IIF((ORDKEYNO())%2==0,RGB(230,230,230),RGB(190,215,190))} Espero te sirva
Coloring a line Solved. Now coloring an individual cell
Harvey, I notice a lot of common elements in your code. For instance, you have about 17 sections like this: [code=fw:o09hqod6]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; ADD &nbsp;<span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">DATA</span> ; <br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> gl->title = <span style="color: #ff0000;">'-'</span> .or. gl->title = <span style="color: #ff0000;">'='</span> .or. ; <br />&nbsp; &nbsp; &nbsp; gl->account $ <span style="color: #ff0000;">'2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610'</span>, ; <br />&nbsp; &nbsp; &nbsp; repli<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">" "</span>,<span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span>, trans<span style="color: #000000;">&#40;</span>Eval<span style="color: #000000;">&#40;</span>bty7<span style="color: #000000;">&#41;</span>, &nbsp;; <br />&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">'999,999,999'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> msize ; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RIGHT</span> ; &nbsp; <br />&nbsp; &nbsp; &nbsp; HEADER m7+cActl7; <br />&nbsp; &nbsp; &nbsp; footer <span style="color: #ff0000;">" "</span></div>[/code:o09hqod6] By converting the above to a function you could eliminate 16 of those sections of code since you could then call the function like this: [code=fw:o09hqod6]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp;cActs:= <span style="color: #ff0000;">'2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610'</span> <br />&nbsp; &nbsp; &nbsp; addBrw<span style="color: #000000;">&#40;</span> oBrw, cActs, <span style="color: #000000;">30</span>, m7+cAct17 <span style="color: #000000;">&#41;</span></div>[/code:o09hqod6] Here is the function: [code=fw:o09hqod6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> addBrw<span style="color: #000000;">&#40;</span> oBrw, cActs, nSize, cHeader, cFooter <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">default</span> nSize:=<span style="color: #000000;">30</span>, cHeader:=<span style="color: #ff0000;">" "</span>,cFooter:=<span style="color: #ff0000;">" "</span><br /><br />&nbsp; &nbsp; &nbsp;ADD <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">DATA</span> ; <br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> gl->title = <span style="color: #ff0000;">'-'</span> .or. gl->title = <span style="color: #ff0000;">'='</span> .or. ; <br />&nbsp; &nbsp; &nbsp; gl->account $ cActs, ; <br />&nbsp; &nbsp; &nbsp; repli<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">" "</span>,<span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span>, trans<span style="color: #000000;">&#40;</span>Eval<span style="color: #000000;">&#40;</span>bty7<span style="color: #000000;">&#41;</span>, &nbsp;; <br />&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">'999,999,999'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> nSize ; <br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RIGHT</span> ; &nbsp; <br />&nbsp; &nbsp; &nbsp; HEADER cHeader; <br />&nbsp; &nbsp; &nbsp; footer cFooter<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:o09hqod6] I know you are thinking, "if it isn't broke, then don't fix it." Perhaps a good philosophy, but less is more is also a good one. Less code makes the code easier to read and understand and less likely to contain bugs. If you do find a bug in a function, one fix is all that is needed. At least do consider it for future work. Regards, James
Coloring a line Solved. Now coloring an individual cell
Can't get the line to color. What am I doing wrong. Here is the code [code=fw:1c80htvx]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// COLOR SET UP</span><br />oBrw:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>||<span style="color: #000000;">&#123;</span>CLR_BLACK,CLR_WHITE<span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>gl->ty13 < <span style="color: #000000;">0</span>, CLR_YELLOW, CLR_WHITE<span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <br /><br /> oBrw:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert, ;<br />   <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.710</span>,<span style="color: #000000;">8388608</span>,<span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>, ;<br />   <span style="color: #000000;">&#123;</span>   <span style="color: #000000;">0.710</span>,<span style="color: #000000;">16777215</span>,<span style="color: #000000;">8388608</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, ;<br />   <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.710</span>,<span style="color: #000000;">8388608</span>,<span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>, ;<br />   <span style="color: #000000;">&#123;</span>   <span style="color: #000000;">0.710</span>,<span style="color: #000000;">16777215</span>,<span style="color: #000000;">8388608</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// TYPICAL COLUMN IN THE BROWSE</span><br /> ADD <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">DATA</span> ; <br />      <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> gl->title = <span style="color: #ff0000;">'-'</span> .or. gl->title = <span style="color: #ff0000;">'='</span> .or. ; <br />      gl->account $ <span style="color: #ff0000;">'2053,2514,2632,2733,2833,2933,2998,3355,3485'</span>, ; <br />      repli<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">" "</span>,<span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span>, trans<span style="color: #000000;">&#40;</span>Eval<span style="color: #000000;">&#40;</span>bty1<span style="color: #000000;">&#41;</span>,  ; <br />      <span style="color: #ff0000;">'999,999,999'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ; <br />      <span style="color: #0000ff;">SIZE</span> msize ; <br />      <span style="color: #0000ff;">RIGHT</span> ;   <br />      HEADER m1+cActl1;  <br />      footer <span style="color: #ff0000;">" "</span><br /><br /><span style="color: #B900B9;">// Nothing works.</span><br /><br /> </div>[/code:1c80htvx]
Coloring a line Solved. Now coloring an individual cell
Instead of [code=fw:14t29xjj]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>||<span style="color: #000000;">&#123;</span>CLR_BLACK,CLR_WHITE<span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>gl->ty13 < <span style="color: #000000;">0</span>, CLR_YELLOW, CLR_WHITE<span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <br />&nbsp;</div>[/code:14t29xjj] please try: [code=fw:14t29xjj]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>||If<span style="color: #000000;">&#40;</span> gl->ty13 < <span style="color: #000000;">0</span>, <span style="color: #000000;">&#123;</span>CLR_BLACK,CLR_YELLOW<span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span>CLR_BLACK,CLR_WHITE<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />&nbsp;</div>[/code:14t29xjj] Result is the row is colored Black on Yellow for negative values of ty13 and Black on White for positive values of ty13.
Coloring a line Solved. Now coloring an individual cell
Rao: As always perfect.
Coloring a line Solved. Now coloring an individual cell
Roa maybe you can help me color a cell. This is the code using xbrowse. I get a bound array acess error. [code=fw:30j4iflq]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">//No array is declared </span><br /><br /><span style="color: #B900B9;">// color cell...I want to color third column on a recored. FixFlag1() finds the record.</span><br /><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span>    := <span style="color: #000000;">&#123;</span>||If<span style="color: #000000;">&#40;</span>fixFlag1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,CLR_BLACK,CLR_YELLOW<span style="color: #000000;">&#41;</span>,CLR_WHITE <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// TYPICAL column 17 of them.</span><br /><br /> ADD <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">DATA</span> ; <br />   <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> gl->title = <span style="color: #ff0000;">'-'</span> .or. gl->title = <span style="color: #ff0000;">'='</span> .or. ; <br />   gl->account $ <span style="color: #ff0000;">'2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610'</span>, ; <br />   repli<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"  "</span>,<span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span>, trans<span style="color: #000000;">&#40;</span>Eval<span style="color: #000000;">&#40;</span>bty14<span style="color: #000000;">&#41;</span>, ; <br />   <span style="color: #ff0000;">'999,999,999'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />   <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">71</span> ; <br />   <span style="color: #0000ff;">RIGHT</span> ;  <br />   HEADER <span style="color: #ff0000;">"Start Up"</span>;  <br />   footer <span style="color: #ff0000;">" "</span></div>[/code:30j4iflq] I just can't get it to work. Thanks again
Coloring a line Solved. Now coloring an individual cell
[code=fw:2saoefbn]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>||If<span style="color: #000000;">&#40;</span>fixFlag1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#123;</span> CLR_BLACK, CLR_YELLOW <span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span> CLR_BLACK, CLR_WHITE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:2saoefbn] or [code=fw:2saoefbn]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> CLR_BLACK, &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> fixFlag1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, CLR_YELLOW, CLR_WHITE <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:2saoefbn]
Coloring a line Solved. Now coloring an individual cell
Can you please post your full code for the browse and explain what is it want to show?
Coloring a line Solved. Now coloring an individual cell
Messy code: IF YOU NEED ANYTHING ELSE LET ME KNOW. DEFINE FONT oFont3 NAME "Ms Sans Serif" SIZE 2,1  DEFINE WINDOW oWnd TITLE "View Print Edit Reports" ;  COLOR CLR_WHITE, CLR_WHITE  if viewingMulti == 0     define dialog oDlg resource "hagbrow" of oWnd1 TRANSPARENT TITLE cItem Font oFont3       REDEFINE TABS oTabs PROMPTS "Profit And Loss", "Cash Flow", "Balance Sheet", "Product Analysis", "Credit Line Usage","Information",cCalc ID 4001 OF oDlg;       action(nnOPtion := oTabs:nOption,xpicard(oDlg,oBrw,nnOption,xCol,oSay35,oSay36,oSay37))   update    else       define dialog oDlg resource "hagbrow" of oWnd1 TRANSPARENT TITLE cItem Font oFont3       REDEFINE TABS oTabs PROMPTS "Profit And Loss", "Cash Flow", "Balance Sheet", "Product Analysis", "Credit Line Usage","Information",cCalc ID 4001 OF oDlg;       action(nnOPtion := oTabs:nOption,xpicard(oDlg,oBrw,nnOption,xCol,oSay35,oSay36,oSay37))   update    endif       oDlg:oTop := oTabs    getcoors(ownd1:nTop,ownd1:nLeft,ownd1:nBottom,ownd1:nRight)    if ownd1:nright >= 1020 //.and. ownd1:nright < 1028        if bFont[1]   <= 16          oDlg:bResized  :=                           ;          {|| aRect  := GetWndRect(oDlg:hWnd),    ;          oBrw:Move( 24,4,arect[ 4 ]-arect[ 2 ] -16, ; //16          aRect[3]-aRect[1]-175,.t.);       //150                                    // 130          ,oBtn1:move(arect[3] -aRect[1]- 89,11  ,,,.t.);   //14  *          ,oBtn5:move(arect[3] -aRect[1]- 89,197 ,,,.t.);   //106          ,oBtn7:move(arect[3] -aRect[1]- 89,380 ,,,.t.);   //16          ,oBtn2:move(arect[3] -aRect[1]- 119,481 ,,,.t.);  //4002          ,oBtn13:move(arect[3] -aRect[1]-145,422 ,,,.t.);  //20          ,oCbx:move(arect[3]  -aRect[1]- 89,575 ,,,.t.);   //18 Transfer data          ,oCbx1:move(arect[3] -aRect[1]- 119,575 ,,,.t.);  //          ,oCbx2:move(arect[3] -aRect[1]- 119,11  ,,,.t.);  //15 *          ,oCbx3:move(arect[3] -aRect[1]- 119,197 ,,,.t.);  //14          ,oCbx5:move(arect[3] -aRect[1]-  89,875 ,,,.t.);  //24          ,oSay11:move(arect[3]-aRect[1]- 119,806 ,,,.t.);  //          ,oSay12:move(arect[3]-aRect[1]- 111,806 ,,,.t.);  //          ,oCbx4:move(                    "",728 ,,,.t.);   //reports          ,oSay20:move(arect[3] -aRect[1]-145,11  ,,,.t.);  //75 *   //120          ,oSay21:move(arect[3] -aRect[1]-145,197 ,,,.t.);  //23 *          ,oBtn3:move(arect[3]  -aRect[1]-119,380 ,,,.t.)}  //103          //,oBtn4:move(                    "",620 ,,,.t.); //calculate          //,oBmp1:move(                    "",11 ,,,.t.);  //calculate          //,oBmp5:move(arect[3] -aRect[1]- 149,380 ,,,.t.);// Info          //,oSay13:move(                   "",855 ,,,.t.); //       else          //? "2"             oDlg:bResized  :=                           ;          {|| aRect  := GetWndRect(oDlg:hWnd),    ;          oBrw:Move( 24,4,arect[ 4 ]-arect[ 2 ] -16, ; //16          aRect[3]-aRect[1]-207,.t.);    //150 //175                                 // 130          ,oBtn1:move(arect[3] -aRect[1]- 102,5  ,,,.t.);   //14  *          ,oBtn5:move(arect[3] -aRect[1]- 102,197 ,,,.t.);  //106          ,oBtn7:move(arect[3] -aRect[1]- 102,380 ,,,.t.);  //16          ,oBtn2:move(arect[3] -aRect[1]- 132,520 ,,,.t.);  //4002          ,oBtn13:move(arect[3] -aRect[1]- 145,520 ,,,.t.); //20          ,oCbx:move(arect[3]  -aRect[1]- 102,605 ,,,.t.);  //18 Transfer data          ,oCbx5:move(arect[3] -aRect[1]-  89,875 ,,,.t.);  //24          ,oCbx1:move(arect[3] -aRect[1]- 132,605 ,,,.t.);  //          ,oCbx2:move(arect[3] -aRect[1]- 132,5  ,,,.t.);   //15 *          ,oCbx3:move(arect[3] -aRect[1]- 132,197 ,,,.t.);  //14          ,oSay11:move(arect[3]-aRect[1]- 132,806 ,,,.t.);  //          ,oSay12:move(arect[3]-aRect[1]- 111,806 ,,,.t.);  //          ,oCbx4:move(                    "",675 ,,,.t.);   //reports          ,oSay20:move(arect[3] -aRect[1]-168,5  ,,,.t.);   // 75    *   //120          ,oSay21:move(arect[3] -aRect[1]-168,197 ,,,.t.);  // 75    *          ,oBtn3:move(arect[3]  -aRect[1]-132,380 ,,,.t.)}  //103          //,oBtn4:move(                    "",575 ,,,.t.);  //calculate          //,oBmp5:move(                    "",51 ,,,.t.);  //calculate          //,oBmp1:move(                    "",11 ,,,.t.);  //calculate          //,oBmp5:move(arect[3] -aRect[1]- 168,380 ,,,.t.); // Info          //,oSay13:move(                   "",845 ,,,.t.);  //       endif                 endif    if (oWnd1:nRight > 600 .AND. oWnd1:nRight    < 1020)        bFont := getFontInfo(hFont)          if bFont[1]   <= 16          ///? "3"             ODLG:BRESIZED  :=                           ;          {|| aRect  := GetWndRect(oDlg:hWnd),    ;          oBrw:Move( 24,1,arect[ 4 ]-arect[ 2 ] - 27, ;          aRect[3]-aRect[1]-150,.t.);          ,oBtn1:move(arect[3] -aRect[1]- 55,5,   , ,.t.);  //14          ,oBtn5:move(arect[3] -aRect[1]- 55,177  ,,,.t.);  //106          ,oBtn7:move(arect[3] -aRect[1]- 55,333  ,,,.t.);  //16          ,oBtn2:move(arect[3] -aRect[1]- 85,433  ,,,.t.);  //4002          ,oBtn13:move(arect[3] -aRect[1]- 115,400 ,,,.t.); //20          ,oCbx:move(arect[3]  -aRect[1]- 55,519  ,,,.t.);  //18 Transfer data          ,oCbx1:move(arect[3] -aRect[1]- 85,519  ,,,.t.);  //          ,oCbx2:move(arect[3] -aRect[1]- 85,5    ,,,.t.);  //15           ,oCbx3:move(arect[3] -aRect[1]- 85,177  ,,,.t.);  //14          ,oCbx5:move(arect[3] -aRect[1]- 89,875  ,,,.t.);  //24          ,oSay11:move(arect[3]-aRect[1]- 85,805  ,,,.t.);  //          ,oSay12:move(arect[3]-aRect[1]- 52,805  ,,,.t.);  //          ,oSay20:move(arect[3]-aRect[1]- 115,5   ,,,.t.);  // 75    *          ,oSay21:move(arect[3]-aRect[1]- 115,177 ,,,.t.);  // 75    *          ,oBtn3:move(arect[3] -aRect[1]- 85,349  ,,,.t.),oBrw:refresh()} //103          //,oCbx4:move(                    "",680  ,,,.t.); //reports          //,oBtn4:move(                    "",600  ,,,.t.); //calculate          //,oBmp1:move(                    "",11   ,,,.t.);  //calculate          //,oBmp5:move(arect[3] -aRect[1]- 119,352 ,,,.t.); // Info          //,oSay13:move(                   "",804  ,,,.t.); //          // win32             else          //? "4"          oDlg:bResized  :=                           ;          {|| aRect  := GetWndRect(oDlg:hWnd),    ;          oBrw:Move( 24,4,arect[ 4 ]-arect[ 2 ] -16, ;      //16          aRect[3]-aRect[1]-175,.t.);    //150                                // 130          ,oBtn1:move(arect[3] -aRect[1]- 89,5  ,,,.t.);    //14  *          ,oBtn5:move(arect[3] -aRect[1]- 89,197 ,,,.t.);   //106          ,oBtn7:move(arect[3] -aRect[1]- 89,380 ,,,.t.);   //16          ,oBtn2:move(arect[3] -aRect[1]- 119,400 ,,,.t.);  //4002          ,oBtn13:move(arect[3] -aRect[1]- 115,400 ,,,.t.); //20          ,oCbx:move(arect[3]  -aRect[1]-  89,605 ,,,.t.);  //18 Transfer data          ,oCbx5:move(arect[3] -aRect[1]- 89,875  ,,,.t.);  //24          ,oCbx1:move(arect[3] -aRect[1]- 119,605 ,,,.t.);  //          ,oCbx2:move(arect[3] -aRect[1]- 119,5  ,,,.t.);   //15 *          ,oCbx3:move(arect[3] -aRect[1]- 119,197 ,,,.t.);  //14          ,oSay11:move(arect[3]-aRect[1]- 119,806 ,,,.t.);  //          ,oSay12:move(arect[3]-aRect[1]- 111,806 ,,,.t.);  //          ,oCbx4:move(                    "",675 ,,,.t.);   //reports          ,oSay20:move(arect[3] -aRect[1]-145,5  ,,,.t.);   // 75    *   //120          ,oSay21:move(arect[3] -aRect[1]-145,197 ,,,.t.);  // 75    *          ,oBtn3:move(arect[3]  -aRect[1]-119,380 ,,,.t.)}  //103          //,oBtn4:move(                    "",575 ,,,.t.);  //calculate          //,oBmp1:move(                    "",11 ,,,.t.);  //calculate          //,oBmp5:move(                    "",51 ,,,.t.);  //calculate          //,oSay13:move(                   "",845 ,,,.t.);  //     endif                   endif    redefine column xbrowse oBrw ID 101 of oDlg cell lines //autocols //fastedit       oBrw:nMARQueesTYLE := MARQSTYLE_HIGHLROW                  oBrw:bClrStd  := {||If(FixFlag(),{CLR_BLACK,CLR_YELLOW},{CLR_BLACK ,CLR_WHITE}) }            //oBrw:aCols[3]:bClrstd := {||If(fixFlag1(), { CLR_BLACK, CLR_YELLOW },{ CLR_BLACK, CLR_WHITE } ) }    //oBrw:aCols[3]:bClrstd := {|| { CLR_BLACK,If( fixFlag1(), CLR_YELLOW, CLR_WHITE ) } }                if cFixoDbf  == .f.       select bal              database oDbf            oDbf:GoTop()  #translate oDbf:bal: => oDbf:       oBrw:SetoDbf(oDbf)           else       select gl       database oDbf            oDbf:GoTop()        oBrw:SetoDbf(oDbf)              oBrw:cAlias   := oDbf:cAlias #translate oDbf:gl: => oDbf:       oBrw:nFreeze := 4       // freeze    endif    oBrw:bClrGrad := { | lInvert | If( ! lInvert, ;    { { 0.710,8388608,16777215 }, ;    {   0.710,16777215,8388608 } }, ;    { { 0.710,8388608,16777215 }, ;    {   0.710,16777215,8388608 } } ) }    msize := 68 // 78    if mWhichCountry == .t. // CANADA          if !EMPTY(cFrecast)          ADD COLUMN TO xbrowse oBrw data {|| trans(oBrw:oDbf:gl:trend, '@Z 999.9') };          SIZE 40 COLOR CLR_BLACK, CLR_WHITE LEFT HEADER "TrendIt"          ADD COLUMN TO xbrowse oBrw DATA {|| if(gl->gst == 1, "Yes", if(gl->gst == 0, " ",)) };          SIZE 25 COLOR CLR_BLACK, CLR_WHITE LEFT HEADER "GST" // blank cursor colm       else          ADD COLUMN TO xbrowse oBrw DATA {|| if(gl->gst == 1, "Yes", if(gl->gst == 0, " ",)) };          SIZE 25 COLOR CLR_BLACK, CLR_WHITE LEFT HEADER "GST" // blank cursor colm       endif    else        if !EMPTY(cFrecast)          ADD COLUMN TO xbrowse oBrw data {|| trans(oBrw:oDbf:gl:trend, '@Z 999.9') };          SIZE 40 COLOR CLR_BLACK, CLR_WHITE LEFT HEADER "TrendIt"       else          //oBrw:hBmpCursor := LoadBitmap( GetResources(), "Z_Finger" )          ADD TO xbrowse oBrw DATA {|| if(gl->gst == 1, "   ", if(gl->gst == 0, " ",)) };          SIZE 20 COLOR CLR_BLACK, CLR_WHITE LEFT HEADER " " // blank cursor colm       endif    endif           gl->(dbGoTop())    oBrw:bLDblClick := { | nRow,nCol |if (nNewVar == 1,msginfo("Editing is not available while vewing this report."),(odlg:hide(),apicard( oBrw, nRow, nCol, odlg))),oBrw:refresh();    ,oBrw:setfocus(),odlg:show(),needCalc(oDlg),oBrw:refresh(),oBrw:setfocus(),mPassMess := .t.}    oBrw:bKeyChar  := { | nKey,nRow,nCol | if(nKey=VK_RETURN,;    (IF(nNewVar == 1,msginfo("Editing is not available while in this report.");    ,(odlg:hide(),apicard( oBrw, nRow, nCol, odlg))),whatUsing(oDlg),oDlg:update(),oBrw:refresh(),oBrw:setfocus(),odlg:show(),needCalc(oDlg)),),.t.}    // 2007    oBrw:bRClicked  := {| nRow,nCol | build(oBrw, nRow, nCol, odlg),oBrw:refresh(),oBrw:setfocus(),odlg:setfocus(),mPassMess := .t.}    setkey (VK_F6,{|| newInfo(),oBrw:refresh(),oBrw:setfocus()})    msgWait("Color coding departments. To see coding use the F12 key.","Attention",3)    ADD TO xBROWSE oBrw ;    data {|| if(gl->title == repli('-', 30), repli(' ' , 30), ;    if(gl->title == repli('=', 30), repli(' ', 30), ;    trans(gl->account,"9999"))) }    ;    SIZE 36 LEFT HEADER "Account (dblclick to edit)"  COLOR CLR_BLACK,CLR_HGRAY     ADD  TO xBROWSE oBrw ;    SIZE 6  LEFT COLOR {||IF((gl->account >= "1500" .AND. gl->account <= "2040"),{RGB(0,0,0),RGB(128,0,0)},;    IF((gl->account >= "2055" .AND. gl->account <= "2500"),{RGB(0,0,0),RGB(0,0,128)},;    IF((gl->account >= "2520" .AND. gl->account <= "2625"),{RGB(0,0,0),RGB(0,128,0)},;    IF((gl->account >= "2635" .AND. gl->account <= "2720"),{RGB(0,0,0),RGB(0,128,128)},;    IF((gl->account >= "2735" .AND. gl->account <= "2820"),{RGB(0,0,0),RGB(128,0,128)},;    IF((gl->account >= "2835" .AND. gl->account <= "2920"),{RGB(0,0,0),RGB(128,128,0)},;    IF((gl->account >= "3000" .AND. gl->account <= "3353"),{RGB(0,0,0),RGB(0,0,255)},;    IF((gl->account >= "3360" .AND. gl->account <= "3480"),{RGB(0,0,0),RGB(255,0,255)},;    IF((gl->account >= "3491" .AND. gl->account <= "3544"),{RGB(0,0,0),RGB(255,128,0)},;    IF((gl->account >= "2935" .AND. gl->account <= "2996"),{RGB(0,0,0),RGB(0,255,0)},;    {RGB(0,0,0),RGB(255,255,255)}))))))))))}    ADD TO xBROWSE oBrw ;    data {|| if(gl->title == repli('-', 30), repli(' ' , 30), ;    if(gl->title == repli('=', 30), repli(' ', 30), ;    eval(cBal))) }   ;    SIZE 140  LEFT HEADER "Account (dblclick to edit)"  //COLOR CLR_BLACK,CLR_HGRAY     * ADD TO oBrw DATA ;    * If( gl->title = '-' .or. gl->title = '='  .or. ;    * gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485', ;    * repli("  ",30), trans(Eval(bty13),  ;    * '999,999,999'),;    * SIZE 71 ;    * RIGHT ;       * HEADER cone      * ADD TO oBrw DATA ;    * If( gl->title = '-' .or. gl->title = '=' .or. ;    * gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485', ;    * repli("  ",30), trans(Eval(bty14), ;    * '999,999,999'));      * SIZE 71 ;    * RIGHT ;       * HEADER "Start Up";      * footer " "    //(gl->account $ '4601,4602,4603,4604,4605,4607,4608,4609,4610',trans(Eval(bty13),'@Z 999,999,999'))) ;    // msetmths := 13    /////NEW    * ADD TO oBrw DATA ;    * If( gl->title = '-' .or. gl->title = '='  .or. ;    * gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485', ;    * repli("  ",30), trans(Eval(bty15),  ;    * '999,999,999')) ;    * SIZE 71 ;    * RIGHT ;       * HEADER cone      // here         ADD TO oBrw DATA ;    If( gl->title = '-' .or. gl->title = '=' .or. ;    gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;    repli("  ",30), trans(Eval(bty14), ;    '999,999,999'));    SIZE 71 ;    RIGHT ;     HEADER "Start Up";      footer " "    //.or. if(gl->account $ '4601,4602,4603,4604,4605,4607,4608,4609,4610',trans(Eval(bty13),'@Z 999,999,999')) ;    //If( gl->account $ '3000',CLR_BLACK,CLR_BLUE));    //If( gl->account $ '3000',CLR_BLACK,CLR_BLUE," " )    if msetmths >=1       if lUseThis   == .F.  .AND. gl->act1 > 1          cActl1 := "-Actual"       else          cActl1 := ""       endif       ADD TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty1),  ;       '999,999,999'))  ;       SIZE msize       ;       RIGHT            ;          HEADER m1+cActl1 ;         footer " "    endif    if msetmths >=2       if lUseThis   == .F.  .AND. gl->act2 > 1          cActl2 := "-Actual"       else          cActl2 := ""       endif       ADD  TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty2),  ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m2+cActl2;         footer " "       if msetmths = 2          ADD  TO oBrw DATA ;          If( gl->title = '-' .or. gl->title = '=' .or. ;          gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;          repli(" ",30),trans(Eval(bPercent),;          '999.9'))  ;          SIZE msize ;          RIGHT ;             HEADER "%";            footer " "       endif    endif    if msetmths >=3       if lUseThis   == .F.  .AND. gl->act3 > 1          cActl3 := "-Actual"       else          cActl3 := ""       endif       ADD  TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty3),  ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m3+cActl3;         footer " "       if msetmths == 3          ADD  TO oBrw DATA ;          If( gl->title = '-' .or. gl->title = '=' .or. ;          gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;          repli(" ",30), trans(Eval(bPercent),  ;          '999.9' )) ;          SIZE msize ;          RIGHT ;             HEADER "%" ;          footer " "       endif    endif    if msetmths >=4       if lUseThis   == .F.  .AND. gl->act4 > 1          cActl4 := "-Actual"       else          cActl4 := ""       endif       ADD  TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty4),  ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m4+cActl4;         footer " "    endif    if msetmths >=5       if lUseThis   == .F.  .AND. gl->act5 > 1          cActl5 := "-Actual"       else          cActl5 := ""       endif       ADD  TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty5),  ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m5+cActl5;         footer " "    endif    if msetmths >=6       if lUseThis   == .F.  .AND. gl->act6 > 1          cActl6 := "-Actual"       else          cActl6 := ""       endif       ADD  TO oBrw DATA ;       If(  gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty6),  ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m6+cActl6;         footer " "    endif    if msetmths >=7       if lUseThis   == .F.  .AND. gl->act7 > 1          cActl7 := "-Actual"       else          cActl7 := ""       endif       ADD  TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty7),  ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m7+cActl7;       footer " "    endif    if msetmths >=8       if lUseThis   == .F.  .AND. gl->act8 > 1          cActl8 := "-Actual"       else          cActl8 := ""       endif       ADD  TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty8),  ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m8+cActl8;         footer " "    endif    if msetmths >=9       if lUseThis   == .F.  .AND. gl->act9 > 1          cActl9 := "-Actual"       else          cActl9 := ""       endif       ADD  TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty9),  ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m9+cActl9;         footer " "    endif    if msetmths >=10       if lUseThis   == .F.  .AND. gl->act10 > 1          cActl10 := "-Actual"       else          cActl10 := ""       endif       ADD  TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty10), ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m10+cActl10;         footer " "    endif    if msetmths >=11       if lUseThis   == .F.  .AND. gl->act11 > 1          cActl11 := "-Actual"       else          cActl11 := ""       endif       ADD  TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty11), ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m11+cActl11 ;         footer " "    endif    if msetmths >=12       if lUseThis   == .F.  .AND. gl->act12 > 1          cActl12 := "-Actual"       else          cActl12 := ""       endif       ADD  TO oBrw DATA ;       If( gl->title = '-' .or. gl->title = '=' .or. ;       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485,4601,4602,4603,4604,4605,4607,4608,4609,4610', ;       repli(" ",30), trans(Eval(bty12), ;       '999,999,999')) ;       SIZE msize ;       RIGHT ;          HEADER m12+cActl12;       footer " "    endif    /////NEW    if cFixOdbf  == .t.       if msetmths > 3             ADD  TO oBrw DATA ;          If( gl->title = '-' .or. gl->title = '=' .or. ;          gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485', ;          repli(" ",30), trans(Eval(bPercent), ;          '999.9'))  ;          SIZE msize ;          RIGHT ;             HEADER "%";            footer " "       endif    endif    REDEFINE SAY ID 12 OF ODLG  COLOR CLR_WHITE, CLR_RED    // DISPALAY SENSITIVITY             redefine button obtn1 id 14 of oDlg ;    ACTION(oDlg:hide(),setcalc(),lsetmess := .t.,whatifi(),oDlg:show(),openfilter := .f., asetfilter(.f.,obrw),setcalc2(obrw,odlg,2),oBrw:setfocus())        if !EMPTY(cFrecast)       REDEFINE SAY oSay10 prompt alltrim(cFrecast) ID 51 OF ODLG  COLOR CLR_WHITE, CLR_RED //COLOR CLR_RED, CLR_WHITE    else       REDEFINE SAY oSay10 ID 51 OF ODLG      endif           * if viewingMulti == 0    REDEFINE SAY oSay35  ID 412  OF ODLG COLOR CLR_WHITE,CLR_BLUE    REDEFINE SAY oSay36  ID 413  OF ODLG COLOR CLR_WHITE,CLR_BLUE    REDEFINE SAY oSay37  ID 414  OF ODLG COLOR CLR_WHITE,CLR_BLUE    REDEFINE SAY oSay11  ID 200  OF ODLG COLOR CLR_WHITE,CLR_BLUE    REDEFINE SAY oSay12  ID 201  OF ODLG COLOR CLR_WHITE,CLR_BLUE    * endif    //REDEFINE SAY oSay13 prompt cWhatView ID 400 OF ODLG  update COLOR CLR_WHITE,CLR_RED    * if viewingMulti == 0       REDEFINE SAY oSay20 prompt cWhichSales ID 75 OF ODLG update COLOR CLR_WHITE,CLR_BLUE      REDEFINE SAY oSay21 prompt cWhichCost  ID 23 OF ODLG update COLOR CLR_WHITE,CLR_BLUE      * endif    // RUN MULTI YEAR    redefine button obtn9 id 17 of oDlg  ;              action(toCalcOrNot(obrw,oDlg),isMultiYear(),msgwait("Multi year forecast updated.","Please Wait",1))    redefine button obtn2 id 4002 of odlg  ;    action(toCalcOrNot(obrw,oDlg),toExitPrint(oDlg,oBrw,nNewVar,nIndex,msize))    redefine button obtn13 id 20 of odlg  ;    action(find2(2,oBrw," ",.f.,oDlg,oDbf,2))    redefine button obtn3 id 103 of oDlg ;    action(nRecNo := gl->(recno()),oDlg:hide(),openfilter := .t.,addnewaccounts(obrw,odlg,msendtitle,nNewVar),asetfilter(.t.,obrw),gl->(dbgoto(nRecno)),oDlg:show(),oBrw:refresh(),oBrw:setfocus())    * redefine button obtn4 id 105 of oDlg ;    * action(asetcalc(obrw,ODLG),setTheOrder(),gl->(dbgoto(1)),obrw:refresh(),obrw:setfocus())    redefine button obtn5 prompt cCaption id 106 of oDlg ;    action(oDlg:hide(),addexp(obrw,odlg,.f.,.f.,nNewVar),goforward := .t.,odlg:show(),gl->(dbgotop()),oBrw:refresh(),oBrw:setfocus(),mPassMess := .t.,setMess(oDlg,oBrw),cPrompt := "Select accounts to display", oDlg:update(),.t.)    // new 1/25/2009    redefine button obtn7 prompt cPrompt id 16 of oDlg ;    action(if(nWhichDisp == 1,(openfilter := .f., asetfilter(.f.,obrw),gl->(dbgoto(1)),oBtn7:setText("Select accounts to display"), nWhichDisp := 0),;    (nRecNo := gl->(recno()),oDlg:hide(),openfilter := .t.,addnewaccounts(obrw,odlg,msendtitle,nNewVar),asetfilter(.t.,obrw),gl->(dbgoto(nRecno),oDlg:show(),oBtn7:setText("Display only accounts being used"),nWhichDisp := 1)) ),oBrw:setFocus())    * redefine button obtn7 id 16 of oDlg ;    * action(openfilter := .f., asetfilter(.f.,obrw),gl->(dbgoto(1)),oBrw:setfocus(),oBrw:refresh(),oBrw:setfocus())    if lusingOnehr == .f.       if nfp == .T.          cPandl1 := "         < Other Activity Items >"               REDEFINE COMBOBOX OCBX1 VAR cPandl1 ITEMS { "         < Other Activity Items >",;          "Credit line financing and Interest expense"                 ,;          "Amortization of prepaid expenses"                           ,;          "Due to from owners/affiliate and Interest owners"           ,;          "Expense as a percent of change in net assets"               ,;          "Interest on cash balances"                                  ,;             "Investment activity and Revenue From Investments"           ,;          "Notes rec'able amortization and Interest income"            ,;          "Sale of equipment and Gain or loss on the sale of assets"   ,;          "Service contracts receivable and Service income"            ,;          "Start up expenses"                                          ,;          "Term loan amortization and Interest expense"                };          ID 19 OF oDlg on change(asetfilter(.f.,obrw),setup1(cPandl1,10,oDlg,nNewVar),mmcurrec := gl->(recno()),openfilter := .f.,;          asetfilter(.f.,obrw),oDlg:show()                             ,;          setcalc2(obrw,odlg,2)                                        ,;          fixIt(oDlg,oBrw,oCbx1),setTheOrder(),WhatUsing(oDlg),gl->(dbgotop()),oBrw:setfocus())         ;          UPDATE       else                cPandl1 := "         < Other Profit And Loss Items >"                REDEFINE COMBOBOX OCBX1 VAR cPandl1 ITEMS { "         < Other Profit And Loss Items >",;          "Amortization of prepaid expenses"                           ,;          "Credit line financing and Interest expense"                 ,;          "Due to from owners/affiliate and Interest owners"           ,;          "Expense as a percent of net income"                         ,;          "Income tax expense and estimated tax payments"              ,;          "Interest on cash balances"                                  ,;             "Investment activity and Income From Investments"            ,;          "Notes rec'able amortization and Interest income"            ,;          "Sale of equipment and Gain or loss on the sale of assets"   ,;          "Service contracts receivable and Service income"            ,;          "Start up expenses"                                          ,;          "Term loan amortization and Interest expense"                };          ID 19 OF oDlg on change(asetfilter(.f.,obrw),setup1(cPandl1,10,oDlg,nNewVar),mmcurrec := gl->(recno()),openfilter := .f.,;          asetfilter(.f.,obrw),oDlg:show()                             ,;          setcalc2(obrw,odlg,2)                                        ,;          fixIt(oDlg,oBrw,oCbx1),setTheOrder(),WhatUsing(oDlg),gl->(dbgotop()),oBrw:setfocus())         ;          UPDATE       endif        cItem2 := "    < Driver Calculator >"            REDEFINE COMBOBOX OCBX5 VAR cItem2 ITEMS { "    < Driver Calculator >",;       "Sales, regular"                   ,;       "Sales by product, customer etc."  ,;       "Inventory"                        ,;       "Deposits"                         ,;       "Partners draw"                    ,;       "Other assets"                     ,;       "Depreciation Dept. 1"             ,;       "Depreciation Dept. 2"             ,;       "Depreciation Dept. 3"             ,;       "Depreciation Dept. 4"             ,;       "Beginning accounts payable"       ,;       "Beginning accrued expenses"       ,;       "Beginning other payables"}        ;       ID 24 OF oDlg on change(getwhichOne(cItem2),setcalc2(obrw,odlg,2),setTheOrder(),asetfilter(.f.,obrw),;       oBrw:refresh(),oBrw:setfocus(),cItem2 :=  "    < Driver Calculator >",oCbx5:refresh(),.t.)       cPandl4 := " < Reports >"       if nfp == .T.          REDEFINE COMBOBOX OCBX4 VAR cPandl4 ITEMS { " < Reports >",;          "Cash Flow"                ,;          "Financial Position"           ,;          "Program Analysis"  ,;          "Activities"          };          ID 50 OF oDlg on change(getCash(oBtn12,oBtn10,oBrw,oDlg,aCol,oBtn4),;          oBrw:refresh(),oDlg:update(),oBrw:setfocus(),oCbx4:refresh(),.t.)       else            REDEFINE COMBOBOX OCBX4 VAR cPandl4 ITEMS { " < Reports >",;          "Cash Flow"                ,;          "Balance Sheets"           ,;          "Prod./cust. analysis"     ,;          "Profit and Loss"                  ,;          "Credit line analysis"}     ;          ID 50 OF oDlg on change(getCash(oBtn12,oBtn10,oBrw,oDlg,aCol,oBtn4),;          oBrw:refresh(),oDlg:update(),oBrw:setfocus(),oCbx4:refresh(),.t.)       endif       if lusingOnehr == .f.          if nfp == .T.             //whatUsing(oDlg)                cPandl2 := "   < Revenue >"             REDEFINE COMBOBOX OCBX2 VAR cPandl2 ITEMS { "   < Revenue >",;             "Revenue by program" ,;             "Miscellaneous income"};             ID 15 OF oDlg on change(asetfilter(.f.,obrw),setup1(cPandl2,10,oDlg,nNewVar),setTheOrder(),oDlg:show(),setcalc2(obrw,odlg,2),openfilter := .f.,asetfilter(.f.,obrw),;             fixIt(oDlg,oBrw,oCbx1),setTheOrder(),WhatUsing(oDlg),gl->(dbgotop()),oBrw:setfocus());             Update          else             //whatUsing(oDlg)                cPandl2 := "   < Sales/Income >"             REDEFINE COMBOBOX OCBX2 VAR cPandl2 ITEMS { "   < Sales/Income >",;             "Annual, monthly, collections",;             "By product/customer/employee etc.",;             "% completion method",;             "Miscellaneous income"};             ID 15 OF oDlg on change(asetfilter(.f.,obrw),setup1(cPandl2,10,oDlg,nNewVar),setTheOrder(),oDlg:show(),setcalc2(obrw,odlg,2),openfilter := .f.,asetfilter(.f.,obrw),;             fixIt(oDlg,oBrw,oCbx1),setTheOrder(),WhatUsing(oDlg),gl->(dbgotop()),oBrw:setfocus());             Update          endif               if nfp == .T.             cPandl3 := "      < Program Costs >"                                              REDEFINE COMBOBOX OCBX3 VAR cPandl3 ITEMS { "    < Program Costs >",;             "As a percentage of revenue",;             "In detail (33 items)",;             "By program"};             ID 13 OF oDlg on change(asetfilter(.f.,obrw),setup1(cPandl3,9,oDlg,nNewVar),oDlg:show(),setTheOrder(),setcalc2(obrw,odlg,2),openfilter := .f.,asetfilter(.f.,obrw),;             fixIt(oDlg,oBrw,oCbx1),setTheOrder(),WhatUsing(oDlg),gl->(dbgotop()),oBrw:setfocus());             Update          else               cPandl3 := "      < Cost Of Sales >"             REDEFINE COMBOBOX OCBX3 VAR cPandl3 ITEMS { "    < Cost Of Sales >",;             "As a percentage of sales",;             "In detail (33 items)",;             "By product/customer/employee etc."};             ID 13 OF oDlg on change(asetfilter(.f.,obrw),setup1(cPandl3,9,oDlg,nNewVar),oDlg:show(),setTheOrder(),setcalc2(obrw,odlg,2),openfilter := .f.,asetfilter(.f.,obrw),;             fixIt(oDlg,oBrw,oCbx1),setTheOrder(),WhatUsing(oDlg),gl->(dbgotop()),oBrw:setfocus());             Update          endif          cPandl := "       < Cash Flow And Other Items >"          if nfp == .T.               REDEFINE COMBOBOX OCBX VAR cPandl ITEMS { "         < Cash Flow And Other Items >",;             "Adjust other assets"                        ,;             "Beginning financial position"               ,;             "Beginning payables-payment of same"         ,;             "Customer deposits"                          ,;             "Deposits to be made"                        ,;             "Loans due to/from owners/affiliates"        ,;             "Loans from others"                          ,;             "Loans to others"                            ,;             "Name, fiscal period, plan year "            ,;             "New borrowings and investor activities"     ,;             "Purchase of equipment",;             "Sales tax collection and payment"};             ID 18 OF oDlg on change(asetfilter(.f.,obrw),setup1(cPandl,9,oDlg,nNewVar),oDlg:show(),setcalc2(obrw,odlg,2),openfilter := .f.,asetfilter(.f.,obrw),;             fixIt(oDlg,oBrw,oCbx1),setTheOrder(),WhatUsing(oDlg),gl->(dbgotop()),oBrw:setfocus());             Update          else               REDEFINE COMBOBOX OCBX VAR cPandl ITEMS { "         < Cash Flow And Other Items >",;             "Adjust other assets",;             "Beginning balance sheet",;             "Beginning payables-payment of same",;             "Customer deposits"                          ,;             "Deposits to be made", ;             "Dividends to be paid",;             "Enter actual products sold", ;             "Loans due to/from owners/affiliates",;             "Loans from others",;             "Loans to others",;             "Name, fiscal period, plan year ",;             "New borrowings and investor activities",;             "Preferred stock/Treasury stock",;             "Proprietors draw",;             "Purchase of equipment",;             "Sales tax collection and payment"};             ID 18 OF oDlg on change(asetfilter(.f.,obrw),setup1(cPandl,9,oDlg,nNewVar),oDlg:show(),setcalc2(obrw,odlg,2),openfilter := .f.,asetfilter(.f.,obrw),;             fixIt(oDlg,oBrw,oCbx1),setTheOrder(),WhatUsing(oDlg),gl->(dbgotop()),oBrw:setfocus());             Update          endif       endif        //REDEFINE BTNBMP OBMP1  ID 116 OF ODLG   file "TESTBMP2.BMP"        oCbx:cToolTip := "To set a trend for an item double click on "+CRLF+"the 'TrendIt' column and"+;       "enter the amount (%)"+CRLF+" you wish to have the item trend by to future years."       //REDEFINE BTNBMP OBMP5  ID  21 OF ODLG   file "TESTBMP2.BMP"        oBtn3:cToolTip := "Select expense departments to be displayed."+CRLF+;       "Edit a standard payment assumption for all expenses."       oBtn5:cTooltip := "All planning options available and a program map"                                            * oBmp5:cToolTip := "To edit an expense (cell) left double click on the expense."+CRLF+;       * "Left click, the following is available: eleven methods for developing the expense. "+CRLF+;       * "For additional options highlight the expense (cell) then right click on the expense."+CRLF+;       * "Right click, the following is available:"+CRLF+;       * "Remove an expense, edit notes, move an expense from one department to another,"+CRLF+;       * "expense Driver Calculator, allocate the expense to a product, customer etc."                       // SHOW EXPLANATION ONY IF NO SALES ENTERED             if nNewVar == 1          oBtn2:hide()          oBtn3:hide()          //oBtn4:hide()          oBtn5:hide()          oBtn7:hide()          oCbx4:hide()          oCbx5:hide()          oCbx1:hide()          oCbx2:hide()          oCbx3:hide()          oCbx:hide()       endif       * mDontShow := .T.       * small_font := 80          if small_font <= 96 .OR. oWnd1:nRight >= 1020          if mDontShow                activate dialog odlg centered on init(oBrw:maximize(),oDlg:maximize(),addsales(oDlg,oBrw),nIndex(nIndex),donotshow(oBtn1,obtn3,oBtn4,oBtn5,oBtn7,oCbx4,oCbx1,oCbx2,oCbx3,oCbx,nNewVar,oBmp1,cFrecast,oBmp5),;             asetfilter(.f.,obrw),intuit(nNewVar,oBrw,oDlg),gl->(dbgotop()),oBrw:setfocus(),oSay35:hide(),oSay36:hide(),oSay37:hide());             ON PAINT (Gradpaint0( hDC, oDlg,.t.)  )            endif            else          if mDontShow                gl->(dbgotop())             if !EMPTY(cFrecast) .AND. noDisp <> 2                   activate dialog odlg centered on init(donotshow(oBtn1,obtn3,oBtn4,oBtn5,oBtn7,oCbx4,oCbx1,oCbx2,oCbx3,oCbx,nNewVar,oBmp1,cFrecast,oBmp5),;                odlg:maximize(),oBrw:maximize(),gl->(dbgotop(),addsales(oDlg,oBrw),nIndex(nIndex),obrw:setfocus()),oBtn9:hide(),oBtn12:hide(),oBrw:setfocus(),asetfilter(.f.,obrw),intuit(nNewVar,oBrw,oDlg),oSay35:hide(),oSay36:hide(),oSay37:hide());                ON PAINT (Gradpaint0( hDC, oDlg,oBrw )  )               elseif EMPTY(cFrecast)                                                                                                                                                                                                                                                                               activate dialog odlg centered on init(donotshow(oBtn1,obtn3,oBtn4,oBtn5,oBtn7,oCbx4,oCbx1,oCbx2,oCbx3,oCbx,nNewVar,oBmp1,cFrecast,oBmp5),;                odlg:maximize(),oBrw:maximize(),gl->(dbgotop(),addsales(oDlg,oBrw),nIndex(nIndex),obrw:setfocus()),oBtn9:hide(),oBtn12:hide(),oBrw:setfocus(),asetfilter(.f.,obrw),intuit(nNewVar,oBrw,oDlg),oSay35:hide(),oSay36:hide(),oSay37:hide());                ON PAINT (Gradpaint0( hDC, oDlg,oBrw )  )               elseif !EMPTY(cFrecast) .AND. noDisp == 2                                                                                                                                                                                    activate dialog odlg centered on init(donotshow(oBtn1,obtn3,oBtn4,oBtn5,oBtn7,oCbx4,oCbx1,oCbx2,oCbx3,oCbx,nNewVar,oBmp1,cFrecast,oBmp5),;                odlg:maximize(),oBrw:maximize(),gl->(dbgotop(),addsales(oDlg,oBrw),nIndex(nIndex),obrw:setfocus()),oBtn12:hide(),oBrw:setfocus(),asetfilter(.f.,obrw),intuit(nNewVar,oBrw,oDlg),oSay35:hide(),oSay36:hide(),oSay37:hide());                ON PAINT (Gradpaint0( hDC, oDlg,oBrw )  )               endif                 endif            endif  [
Coloring a line Solved. Now coloring an individual cell
Roa tried both of your recommendations ...always a bound array acess error on that line of code. Here is the error. Maybe it will help. [code=fw:2q5uwxwv]<div class="fw" id="{CB}" style="font-family: monospace;">Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">01</span>/<span style="color: #000000;">13</span>/<span style="color: #000000;">11</span>, <span style="color: #000000;">08</span>:<span style="color: #000000;">43</span>:<span style="color: #000000;">25</span><br />   Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1132</span>  Bound error: <span style="color: #000000;">array</span> access<br />   Args:<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = A   <span style="color: #000000;">&#123;</span> ... <span style="color: #000000;">&#125;</span><br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = N   <span style="color: #000000;">3</span><br /> </div>[/code:2q5uwxwv] I even tried use oCol[3] instead of aCols[3] and got an argument error.
Coloring a line Solved. Now coloring an individual cell
James thanks for the good advice. And code. The code that you want to reduce was suggested by you many years ago. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> But as life goes on we hopefully get better. You do me sometimes. An clue how i can color a cell. Always get bound array acess.
Coloring a line Solved. Now coloring an individual cell
Harvey, To color a cell try changing this: // COLOR SET UP oBrw:bClrStd := {||{CLR_BLACK,CLR_WHITE},{ If(gl->ty13 < 0, CLR_YELLOW, CLR_WHITE) } } To this: // COLOR SET UP oBrw:bClrStd := {|| If(gl->ty13 < 0, {CLR_BLACK,CLR_YELLOW}, {CLR_BLACK,CLR_WHITE} ) } Regards, James
Coloring a line Solved. Now coloring an individual cell
Harvey, Or, this is probably what you were trying to do: oBrw:bClrStd := {|| {CLR_BLACK, If(gl->ty13 < 0, CLR_YELLOW, CLR_WHITE) } } James
Coloring a line Solved. Now coloring an individual cell
This colors line which was my first request. It works fine oBrw:bClrStd := {|| {CLR_BLACK, If(gl->ty13 < 0, CLR_YELLOW, CLR_WHITE) } } I want to color one field on a certain record. Roa sent me this but I get error fixflag1() gets the record. oBrw:aCols[3]:bClrstd := {||If(fixFlag1(), { CLR_BLACK, CLR_YELLOW },{ CLR_BLACK, CLR_WHITE } ) } oBrw:aCols[3]:bClrstd := {|| { CLR_BLACK, If( fixFlag1(), CLR_YELLOW, CLR_WHITE ) } } Error occurred at: 01/13/11, 08:43:25 Error description: Error BASE/1132 Bound error: array access Args: [ 1] = A { ... } [ 2] = N 3 Any ideas?
Coloring a line Solved. Now coloring an individual cell
Harvey, Can we see the first 15 lines of the error that show the line numbers and functions? We need to see where the error is occuring. James
Coloring a line Solved. Now coloring an individual cell
Harvey, OK, I have recreated your error. This will happen if the column has not yet been defined. When it has not been defined, there is no corresponding array in oBrw, thus the array access error. So make sure the column you are coloring has been defined, then use this line: oBrw:aCols[3]:bClrstd := {|| { CLR_BLACK, If( fixFlag1(), CLR_YELLOW, CLR_WHITE ) } } (Where 3 is the number of the column) James
Coloring a line Solved. Now coloring an individual cell
Amazing. All I needed to do was move declaration to below columns and it worked like a charm. Thanks again you are a tremendous help.
Colorize a dialog two colors
I use a brush to colorize a dialog DEFINE BRUSH oBrush1 COLOR COLORE_MIO oApp:oMyDialog:SetBrush(oBrush1) for reasons that I am not here to list now I would need to know if I can color a two-color dialog i.e. having a light blue color for two fingers above and another color for the rest of the dialog for example I would like to do this [img:2iprhk4a]https&#58;//i&#46;postimg&#46;cc/fTDPkmdH/Immagine&#46;png[/img:2iprhk4a] oApp:oMyDialog is a tPanel
Colorize a dialog two colors
Silvio, You may use: SetDlgGradient( { { 0.3, CLR_CYAN, CLR_CYAN }, { 0.7, CLR_YELLOW, CLR_YELLOW } } )
Colorize a dialog two colors
Antonio, I use it for a Panel I made oApp:oSpiaggia:bPainted:= {|hDC, cPS| ; SetDlgGradient( { { 0.1, CLR_CYAN, CLR_CYAN }, { 0.9, COLORE_SABBIA, COLORE_SABBIA } } ); } then on this tPanel I use btnbmp and ( on top ) the objects Ximage the colors are bpainted but there is something not run ok because I see a white background it is strange because btnbmps and xmage are transparent Loook : [img:6j4lhb3w]https&#58;//i&#46;postimg&#46;cc/NGV6VN75/look&#46;jpg[/img:6j4lhb3w]
Colorize a dialog two colors
I found the error the Panel is not trasparent then I made oApp:oSpiaggia:lTransparent :=.t. and then I saw the problem all btnbmp are not transparent ( look at your email)
Colorize a second xbrowse
I have created a procedure to insert the absences of a teacher, from an initial selection, the final user can view the weekly timetable of the teacher absent and the second display browse all teachers who have available for those hours when the teacher is absent [img:2vqc75k1]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2015/03/SOSTITUZIONI&#46;jpg[/img:2vqc75k1] I need to colorize the columns of second xbrowse at the same point of the red lines to highlight the hours to be covered by the substitutions weekly teacher absent or colorize only the lines (nColDividerStyle) with another color to highlight any solution ?
Colorized cell of xbrowse
I have to color the xbrowse cells on each line with a different color depending on the value of the cell, I made WITH OBJECT oBrw .... FOR i := 1 TO LEN(:aCols) oCol := :aCols[ i ] oCol:nWidth := 30 if i >1 oCol:bClrStd := {|i| { ChangeColor( oBrw, i ) } } endif NEXT :CreateFromCode() END static function ChangeColor( oBrw, n ) return {|| { CLR_BLACK, ColorCell( oBrw:aRow[ n ]:VALUE ) } } static function ColorCell( num ) local nColor := GetSysColor( 15 ) //for demo local nColor1 := CLR_HGREEN local nColor2 := CLR_HRED local ncolor3 := GetSysColor( 15 ) /* IF num<3 nColor :=nColor1 elseif num>3 nColor := nColor2 elseif num<9 nColor := nColor3 endif*/ return nColor where is the error ?
Colorized cell of xbrowse
Silvio, I think you should change this oCol:bClrStd := {|i| { ChangeColor( oBrw, i ) } } For this: oCol:bClrStd := {|| { ChangeColor( oBrw, i ) } } But "i" is the variable of the FOR and when the browse is created the value of "i" will be the size of oBrw:aCols + 1
Colorized cell of xbrowse
[quote="vilian":2hs12tnw]Silvio, I think you should change this oCol:bClrStd := {|i| { ChangeColor( oBrw, i ) } } For this: oCol:bClrStd := {|| { ChangeColor( oBrw, i ) } } But "i" is the variable of the FOR and when the browse is created the value of "i" will be the size of oBrw:aCols + 1[/quote:2hs12tnw] the problem is then the function ChangeColor() not found the "i" variable
Colorized cell of xbrowse
Maybe you have also the issue with Detached Locals ? [url:u8gayfb4]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=41373&hilit=detached+local[/url:u8gayfb4]
Colorized cell of xbrowse
[quote="Marc Venken":2sjo6sj0]Maybe you have also the issue with Detached Locals ? [url:2sjo6sj0]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=41373&hilit=detached+local[/url:2sjo6sj0][/quote:2sjo6sj0] I need something of this [img:2sjo6sj0]https&#58;//i&#46;postimg&#46;cc/BZj0CppK/HHH&#46;png[/img:2sjo6sj0]
Colorized cell of xbrowse
[code=fw:zuxqetpp]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">bClrStd</span> := ChangeColor<span style="color: #000000;">&#40;</span> oBrw, i <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:zuxqetpp]
Colorized cell of xbrowse
[quote="nageswaragunupudi":39pa5n40][code=fw:39pa5n40]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">bClrStd</span> := ChangeColor<span style="color: #000000;">&#40;</span> oBrw, i <span style="color: #000000;">&#41;</span><br /> </div>[/code:39pa5n40][/quote:39pa5n40] Nages, give me error WITH OBJECT oBrw :nRowHeight := 22 :nClrBorder := CLR_GRAY :lDrawBorder := .t. :nColorBox := CLR_HRED :nMarqueeStyle := MARQSTYLE_HIGHLWIN7 :lHscroll := .f. :l2007 := .F. :l2015 := .f. :nStretchCol := STRETCHCOL_WIDEST :lAllowRowSizing := .F. :lAllowColSwapping := .F. :lAllowColHiding := .F. :lRecordSelector := .F. :nColDividerStyle := LINESTYLE_LIGHTGRAY :nRowDividerStyle := LINESTYLE_LIGHTGRAY :nRowDividerStyle := LINESTYLE_NOLINES :nColDividerStyle := LINESTYLE_LIGHTGRAY :lDisplayZeros := .t. //Ineed the value zero FOR i := 1 TO LEN(:aCols) oCol := :aCols[ i ] oCol:nWidth := 30 if i >1 oCol:bClrStd := ChangeColor( oBrw, i ) oCol:bClrSelFocus := {|| { CLR_BLACK, { { 1, RGB( 252, 235, 220 ), RGB( 255, 0,0 ) } }}} endif NEXT :CreateFromCode() :aCols[ 1 ]:nWidth := 100 :aCols[ 1 ]:nDataStrAlign := AL_LEFT :SetStyle( 2018 ) end with static function ChangeColor( oBrw, n ) return {|| { CLR_BLACK, ColorCell( oBrw:aRow[ n ]:VALUE ) } } static function ColorCell( num ) local nColor := GetSysColor( 15 ) If num= 0 nColor := CLR_HGREEN elseif num >0 .and. num < 8 nColor := CLR_WHITE elseif num >9 nColor := CLR_HRED endif return nColor
Colorized cell of xbrowse
[quote="Silvio.Falconi":2g88ha0o][quote="nageswaragunupudi":2g88ha0o][code=fw:2g88ha0o]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">bClrStd</span> := ChangeColor<span style="color: #000000;">&#40;</span> oBrw, i <span style="color: #000000;">&#41;</span><br /> </div>[/code:2g88ha0o][/quote:2g88ha0o] Nages, give me error WITH OBJECT oBrw :nRowHeight := 22 :nClrBorder := CLR_GRAY :lDrawBorder := .t. :nColorBox := CLR_HRED :nMarqueeStyle := MARQSTYLE_HIGHLWIN7 :lHscroll := .f. :l2007 := .F. :l2015 := .f. :nStretchCol := STRETCHCOL_WIDEST :lAllowRowSizing := .F. :lAllowColSwapping := .F. :lAllowColHiding := .F. :lRecordSelector := .F. :nColDividerStyle := LINESTYLE_LIGHTGRAY :nRowDividerStyle := LINESTYLE_LIGHTGRAY :nRowDividerStyle := LINESTYLE_NOLINES :nColDividerStyle := LINESTYLE_LIGHTGRAY :lDisplayZeros := .t. //Ineed the value zero FOR i := 1 TO LEN(:aCols) oCol := :aCols[ i ] oCol:nWidth := 30 if i >1 oCol:bClrStd := ChangeColor( oBrw, i ) oCol:bClrSelFocus := {|| { CLR_BLACK, { { 1, RGB( 252, 235, 220 ), RGB( 255, 0,0 ) } }}} endif NEXT :CreateFromCode() :aCols[ 1 ]:nWidth := 100 :aCols[ 1 ]:nDataStrAlign := AL_LEFT :SetStyle( 2018 ) end with static function ChangeColor( oBrw, n ) return {|| { CLR_BLACK, ColorCell( oBrw:aRow[ n ]:VALUE ) } } static function ColorCell( num ) local nColor := GetSysColor( 15 ) If num= 0 nColor := CLR_HGREEN elseif num >0 .and. num < 8 nColor := CLR_WHITE elseif num >9 nColor := CLR_HRED endif return nColor[/quote:2g88ha0o] [code=fw:2g88ha0o]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ChangeColor<span style="color: #000000;">&#40;</span> oBrw, n <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//return {|| { CLR_BLACK, ColorCell( oBrw:aRow[ n ]:VALUE ) } }    //Aquí hay un error. Cambia esta linea por la siguiente. &nbsp;//There is an error here. Change this line to the next.</span><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> CLR_BLACK, ColorCell<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:2g88ha0o]
Colorized cell of xbrowse
I have also error Error occurred at: 07-03-2022, 12:37:57 Error description: Error BASE/1075 Parametro errato: > Args: [ 1] = U [ 2] = N 0 Stack Calls =========== Called from: source\tipico.prg => COLORCELL( 189 ) Called from: source\tipico.prg => (b)CHANGECOLOR( 183 ) the xbrowse [code=fw:91f39kc1]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ <span style="color: #000000;">90</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> &nbsp;oBrw <span style="color: #0000ff;">OF</span> oDlgRitardo &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-80</span> <span style="color: #0000ff;">PIXEL</span> NOBORDER<br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span>aData,,,.F.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; SetupBrowserRit<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:91f39kc1] [b:91f39kc1]proc SetupBrowserTip(oBrw)[/b:91f39kc1] [code=fw:91f39kc1]<div class="fw" id="{CB}" style="font-family: monospace;"><br />proc SetupBrowserTip<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"Combinazione"</span> <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"Ba"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"Ca"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"FI"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"Ge"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"Mi"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"Na"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"Pa"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"Ro"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">9</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"To"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">10</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"Ve"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">11</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw HEADER <span style="color: #ff0000;">"Nz"</span> &nbsp; &nbsp; <span style="color: #00C800;">DATA</span> <span style="color: #000000;">&#123;</span>|v,oCol| oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span>,<span style="color: #000000;">12</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">CENTER</span><br /><br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; <br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRowHeight</span> &nbsp; &nbsp;:= <span style="color: #000000;">22</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nClrBorder</span> := CLR_GRAY<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lDrawBorder</span> := .t.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nColorBox</span> := CLR_HRED<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nMarqueeStyle</span> &nbsp; &nbsp; &nbsp; := MARQSTYLE_HIGHLWIN7<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lHscroll</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">l2007</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">l2015</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> &nbsp; &nbsp; &nbsp; &nbsp; := STRETCHCOL_WIDEST<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowRowSizing</span> &nbsp; &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowColSwapping</span> &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowColHiding</span> &nbsp; &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lRecordSelector</span> &nbsp; &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nColDividerStyle</span> &nbsp; &nbsp;:= LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRowDividerStyle</span> &nbsp; &nbsp;:= LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRowDividerStyle</span> &nbsp; &nbsp;:= LINESTYLE_NOLINES<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nColDividerStyle</span> &nbsp; &nbsp;:= LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lDisplayZeros</span> &nbsp; &nbsp; &nbsp; := .t.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol := :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol:<span style="color: #000000;">nWidth</span> &nbsp; := <span style="color: #000000;">30</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> i ><span style="color: #000000;">1</span> &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol:<span style="color: #000000;">bClrStd</span> := ChangeColor<span style="color: #000000;">&#40;</span> oBrw, i <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> &nbsp; := <span style="color: #000000;">100</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> &nbsp; := AL_LEFT<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetStyle</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2018</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;end with<br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ChangeColor<span style="color: #000000;">&#40;</span> oBrw, n <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> CLR_BLACK, ColorCell<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ColorCell<span style="color: #000000;">&#40;</span> num <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nColor &nbsp;:= &nbsp;GetSysColor<span style="color: #000000;">&#40;</span> <span style="color: #000000;">15</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> num= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; nColor := CLR_HGREEN<br />&nbsp; &nbsp; elseif num ><span style="color: #000000;">0</span> .and. num < <span style="color: #000000;">8</span><br />&nbsp; &nbsp; &nbsp; nColor := CLR_WHITE<br />&nbsp; &nbsp; elseif num ><span style="color: #000000;">9</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nColor := CLR_HRED<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> nColor<br /><br /><br /><br />&nbsp;</div>[/code:91f39kc1]
Colorized cell of xbrowse
hi Silvio, you try to "add" Codeblock in a Loop but your "Counter" does not work that Way. you need to use a "String" to build a Codeblock so this might work [code=fw:3fg1p52c]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">LOCAL</span> cString := <span style="color: #ff0000;">"{|| { CLR_BLACK, ColorCell( oBrw:aRow["</span> + STR<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"] ) } }"</span><br /><span style="color: #00C800;">RETURN</span> &cString</div>[/code:3fg1p52c]
Colorized cell of xbrowse
[b:2gd91ka0]Resolved!!![/b:2gd91ka0] [img:2gd91ka0]https&#58;//i&#46;postimg&#46;cc/RVJpVKyB/yes&#46;png[/img:2gd91ka0] FOR i := 2 TO LEN(:aCols) oCol := :aCols[ i ] oCol:nWidth := 30 :aCols[ i ]:bClrStd := ChangeColor( oBrw, i ) NEXT
Colorized cell of xbrowse
If I use :nMarqueeStyle := MARQSTYLE_HIGHLWIN7 the n I not see the right color How I can to hav the bar nmarquee on only first column ?
Colorized cell of xbrowse
[quote="Silvio.Falconi":wl8x30dh] How I can to hav the bar nmarquee on only first column ?[/quote:wl8x30dh] I do it like that: [code=fw:wl8x30dh]<div class="fw" id="{CB}" style="font-family: monospace;">   WITH OBJECT oBrw<br />      :<span style="color: #000000;">nMarqueeStyle</span>       := MARQSTYLE_HIGHLCELL <br />      :<span style="color: #000000;">lColChangeNotify</span>  := .t.  <br />      :<span style="color: #000000;">bChange</span>               := <span style="color: #000000;">&#123;</span> |o| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nColSel</span><><span style="color: #000000;">1</span>, <span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nColSel</span>:=<span style="color: #000000;">1</span>, o:<span style="color: #000000;">RefreshCurrent</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END</div>[/code:wl8x30dh]
Colorized cell of xbrowse
THANKS [img:y6v5axum]https&#58;//i&#46;postimg&#46;cc/ydhHSdcM/JJJJ&#46;png[/img:y6v5axum]
Colors (SOLVED)
Hello friends! I need a little help, I have a color in decimal (for example 6736896). How to get tones above or below, what's the logic? Thanks
Colors (SOLVED)
Christiano, ? hb_NumToHex( 6736896 ) => 0x[color=#FF0000:r6k6f0b7]66[/color:r6k6f0b7][color=#008040:r6k6f0b7]CC[/color:r6k6f0b7][color=#0000FF:r6k6f0b7]00[/color:r6k6f0b7] (hexadecimal) ? hb_NumToHex( hb_bitAnd( 6736896, 0x[color=#FF0000:r6k6f0b7]FF[/color:r6k6f0b7]0000 ) / 0xFF00 ) ? hb_NumToHex( hb_bitAnd( 6736896, 0x00[color=#008000:r6k6f0b7]FF[/color:r6k6f0b7]00 ) / 0x00FF ) ? hb_NumToHex( hb_bitAnd( 6736896, 0x0000[color=#0000FF:r6k6f0b7]FF[/color:r6k6f0b7] ) ) In FWH\include\colors.ch there is a: #translate RGB( <nRed>, <nGreen>, <nBlue> ) => ; ( <nRed> + ( <nGreen> * 256 ) + ( <nBlue> * 65536 ) )
Colors (SOLVED)
Thanks Antonio
Colors (SOLVED)
Hello, about the color-adjustment of a given color can be selected with the slider or a imageclick [quote:eue8k7le][b:eue8k7le]How to get tones above or below, what's the logic?[/b:eue8k7le][/quote:eue8k7le] [b:eue8k7le]Visual adjustment[/b:eue8k7le] A gradient created from < white . Your color. black > This tool uses a given value as Dec or RGB the startposition is 0.5 and can be adjusted to lighter or darker [size=150:eue8k7le][color=#0000FF:eue8k7le]6736896[/color:eue8k7le][/size:eue8k7le] [img:eue8k7le]http&#58;//www&#46;service-fivewin&#46;de/images/Coloradjust1&#46;jpg[/img:eue8k7le] is that what You want to do <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Colors (SOLVED)
Hi Uwe, thanks for replying. I'm adjusting the visual part of my calendar, as the user can change the predominant color of the screen, the calendar has differences in the colors of today, Sundays and holidays. In the way I'm doing it, in some situations it's out of color. So I want to calculate to get a few shades above or below the predominant color. [img:2adg5hjd]http&#58;//maxxtech&#46;com&#46;br/forum/calendario&#46;jpg[/img:2adg5hjd] Hugs
Colors (SOLVED)
Maybe useful for You paint colors from a given DEC or RGB-value or use predefined colors You can save and restore 4 colors adjust the color with the slider or click inside the image as well You get the colornames the ??? buttons will paint the color and shows the values [img:11lkm6ur]http&#58;//www&#46;service-fivewin&#46;de/images/CAdjust1&#46;jpg[/img:11lkm6ur] Download <!-- m --><a class="postlink" href="http://www.service-fivewin.de/DOWNLOADS/CAdjust.zip">http://www.service-fivewin.de/DOWNLOADS/CAdjust.zip</a><!-- m --> best regards Uwe
Colors (SOLVED)
Hi. I haven't touched it yet but that's almost what I need when using the slider but automatically, I think it would be more interesting in my case although I could do something similar and let the user choose the tone they prefer. Would it be possible to share so you can have a beginning? Hugs
Colors (SOLVED)
[quote="Antonio Linares":vbloth36]Christiano, ? hb_NumToHex( 6736896 ) => 0x[color=#FF0000:vbloth36]66[/color:vbloth36][color=#008040:vbloth36]CC[/color:vbloth36][color=#0000FF:vbloth36]00[/color:vbloth36] (hexadecimal) ? hb_NumToHex( hb_bitAnd( 6736896, 0x[color=#FF0000:vbloth36]FF[/color:vbloth36]0000 ) / 0xFF00 ) ? hb_NumToHex( hb_bitAnd( 6736896, 0x00[color=#008000:vbloth36]FF[/color:vbloth36]00 ) / 0x00FF ) ? hb_NumToHex( hb_bitAnd( 6736896, 0x0000[color=#0000FF:vbloth36]FF[/color:vbloth36] ) ) [/quote:vbloth36] I must disagree, the correct formulas are: ? hb_NumToHex( hb_bitAnd( 6736896, 0x[color=#FF0000:vbloth36]FF[/color:vbloth36]0000 ) / 0x10000 ) ? hb_NumToHex( hb_bitAnd( 6736896, 0x00[color=#008000:vbloth36]FF[/color:vbloth36]00 ) / 0x100 ) ? hb_NumToHex( hb_bitAnd( 6736896, 0x0000[color=#0000FF:vbloth36]FF[/color:vbloth36] ) ) or better ? hb_NumToHex( hb_bitShift( hb_bitAnd( 6736896, 0x[color=#FF0000:vbloth36]FF[/color:vbloth36]0000 ) ,-16) ) ? hb_NumToHex( hb_bitShift( hb_bitAnd( 6736896, 0x00[color=#008000:vbloth36]FF[/color:vbloth36]00 ) ,-8) ) ? hb_NumToHex( hb_bitAnd( 6736896, 0x0000[color=#0000FF:vbloth36]FF[/color:vbloth36] ) )
Colors (SOLVED)
I added some new options 1, testing the color as a dialog-brush ( ON / OFF ) 2. saving a color to INI pos. 1, this color is displayed at new start 3. copy to clipboard 4. some internal fixes ctoas what sections do You need ? I can delete the unneeded parts for better reading. [img]http:/CAdjust2.jpg[/img] Download <!-- m --><a class="postlink" href="http://www.service-fivewin.de/DOWNLOADS/CAdjus1t.zip">http://www.service-fivewin.de/DOWNLOADS/CAdjus1t.zip</a><!-- m --> [size=150:fga4y0ih]The extracted main-functions[/size:fga4y0ih] now it is easy to include this color-adjustment in Your own application [img:fga4y0ih]http&#58;//www&#46;service-fivewin&#46;de/images/CAdjust3&#46;jpg[/img:fga4y0ih] Download <!-- m --><a class="postlink" href="http://www.service-fivewin.de/DOWNLOADS/CAdjus12.zip">http://www.service-fivewin.de/DOWNLOADS/CAdjus12.zip</a><!-- m --> best regards Uwe
Colors (SOLVED)
Hello Uwe, thanks for the reply. It's already a good size for you to share. Now I turn around! I appreciate the help!
Colors (SOLVED)
I tested and added a horizontal solution a little colorpicker and control-fields of the pickpositions as a info are included as well. Because of the 2. slider it is posssible to compare 2 colorlevels like the image shows ( bright and dark ) < Create > a new color will update both sliders and all fields I think it will give You the basics to create Your own tool. [img:qpfcfkhc]http&#58;//www&#46;service-fivewin&#46;de/images/CAdjust4&#46;jpg[/img:qpfcfkhc] Download <!-- m --><a class="postlink" href="http://www.service-fivewin.de/DOWNLOADS/CAdjust3.zip">http://www.service-fivewin.de/DOWNLOADS/CAdjust3.zip</a><!-- m --> the needed calculations are included inside the prg [code=fw:qpfcfkhc]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// calculation vertical</span><br /><span style="color: #B900B9;">// ------------------------</span><br /><span style="color: #B900B9;">// imageheight = 300</span><br /><span style="color: #B900B9;">// sliderheight = 330</span><br /><span style="color: #B900B9;">// slidertop = imagetop - 15</span><br /><span style="color: #B900B9;">// slidermarks = 11 = 10 spaces</span><br /><span style="color: #B900B9;">// slider-pixelrowpos = slider rowpos * 10</span><br /><span style="color: #B900B9;">// sliderpos on imageclick = imagepixelpos / 300</span><br /><span style="color: #B900B9;">// imagepos on sliderclick = sliderpos * 30</span><br /><span style="color: #B900B9;">// image-columnpos = imagewidth / 2 = 25</span><br /><br /><span style="color: #B900B9;">// calculation horizontal</span><br /><span style="color: #B900B9;">// --------------------------</span><br /><span style="color: #B900B9;">// imagewidth = 340</span><br /><span style="color: #B900B9;">// sliderwidth = 370</span><br /><span style="color: #B900B9;">// sliderleft = imagejeft - 15</span><br /><span style="color: #B900B9;">// slidermarks = 11 = 10 spaces</span><br /><span style="color: #B900B9;">// slider-pixel-colpos = slider colpos * 10</span><br /><span style="color: #B900B9;">// sliderpos on imageclick = imagepixelpos / 340</span><br /><span style="color: #B900B9;">// imagepos on sliderclick = sliderpos * 34</span><br /><span style="color: #B900B9;">// image-rowpos = imageheight / 2 = 22</span><br /> </div>[/code:qpfcfkhc] best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Colors RptAddColumn
How add color on RptAddColumn ? sample : list of products like Paint shop and I want to show the color in print I saw with Printer class it is possible but with Report Class I not understood How make it
Colors for TTreeView one for each item!?
Dear friends!Exists a way to change the colors of font at treeview but, one color for each item?
Colors for TTreeView one for each item!?
anybody?
Colors for TTreeView one for each item!?
Julio,Have you ever seen that on a tree control before? I doubt that it is possible as it would require a different font for each item.James
Colors for TTreeView one for each item!?
[quote="James Bott":2jfm9l8a]Julio, Have you ever seen that on a tree control before? I doubt that it is possible as it would require a different font for each item. James[/quote:2jfm9l8a]Yes but, not in fivewin. I have used the setColor() method and setFont() too... but, has changed all tree.Really, I want to make the nodes with bold style and another color different of the children. Some like this!
Colors for TTreeView one for each item!?
[quote="James Bott":1b0d3u2e]Julio, Have you ever seen that on a tree control before? I doubt that it is possible as it would require a different font for each item. James[/quote:1b0d3u2e]James, I found same examples of this TreeView. All they are very pretty![img:1b0d3u2e]http&#58;//www&#46;infovark&#46;com/blog/wp-content/uploads/2007/11/treeview&#46;gif[/img:1b0d3u2e][img:1b0d3u2e]http&#58;//www&#46;filebuzz&#46;com/software_screenshot/full/22251-tree_view_outliner&#46;gif[/img:1b0d3u2e][img:1b0d3u2e]http&#58;//www&#46;sharewareplaza&#46;com/images/screenshot/32950&#46;gif[/img:1b0d3u2e]
Colors for TTreeView one for each item!?
Julio,Well, it seems that it can be done with the tree common control.I have found some information about doing this with C here:<!-- m --><a class="postlink" href="http://msdn.microsoft.com/en-us/library/bb761817(VS.85">http://msdn.microsoft.com/en-us/library/bb761817(VS.85</a><!-- m -->).aspxBut, it is beyond my knowledge and understanding of how to do it.Regards,James
Colors for TTreeView one for each item!?
Any news to this one? I could use different fonts in TTreeView as well! Regards, Dietmar
Colors in menus
Hi, How to place a blue bar in the left side of the menus? Thanks,
Colors in menus
Vilian, You need to modify MENUDRAWITEM() in source\winapi\menus.c
Colors in menus
Hi Antonio, Thanks.
Colors of btnbmp
Hi,It's maybe a stange question but is it possible to give a color instead of a bitmap calling BTNBMP?I'm using this buttons in a touchscreen application and the customer can change the color of the buttons.What I did till now is creating a bitmap-drawing for each main color (YELLOW,RED, GREEN,...) with that color.The customer can chose a color from a list and than I'm setting that bitmap to the button.Now I have 9 colors to chose from, but if I want to have more colors I have to create a new bitmap for each color.It would be easyer to just call the button with the color...Thanks
Colors of btnbmp
[code:17a7f0qh]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg, oBtn LOCAL cVar &#58;= SPACE&#40; 20 &#41; DEFINE DIALOG oDlg @ 1, 1 GET cVar @ 30, 10 BTNBMP oBtn PROMPT "Close"; ACTION oDlg&#58;End&#40;&#41; oBtn&#58;SetColor&#40; CLR_RED, CLR_YELLOW &#41; ACTIVATE DIALOG oDlg; CENTER RETURN NIL[/code:17a7f0qh]EMG
Colors of btnbmp
Thanks Enrico,It's working very nice!!Marc
Colors on Multiple Page Printing Dialog
When I preview a multiple page report and then print it, the Dialog box that prompts for printing pages range has a white background color instead of the Dialog box color behind all the text. Can this be fixed? It looks a bit strange. Dan
Colors on Multiple Page Printing Dialog
Dan, Could you please post a screenshot of it ? Please use <!-- m --><a class="postlink" href="http://www.imageshack.us">http://www.imageshack.us</a><!-- m --> to host the image and place here the provided url.
Colors on Multiple Page Printing Dialog
Hello Antonio, The newer prev32.dll fixed the problem. I was using an older version of the prev32.dll. Thanks Dan
Colossus es ahora LGPL
Hola, Quería comunicaros que he liberado el código fuente de mi programa de contraseñas. [url:ia2yc2lh]http&#58;//cincomundos&#46;wordpress&#46;com/2014/06/04/colossus-es-ahora-lgpl/[/url:ia2yc2lh] Saludos, José Luis
Colossus es ahora LGPL
Jose Luís: Muchas gracias por tu generosidad.
Colossus es ahora LGPL
Gracias José Luis por el aporte. Saludos, Adhemar
Colossus es ahora LGPL
Muchas gracias, és posible compilar con xHarbour ó solo en Harbour? Gracias, saludos.
Colossus es ahora LGPL
Muchas Gracias Jose es un programa que le doy gran utilidad, lo llevo conmigo en el PEN, hoy dia uso tantas password y configuraciones que no podia recordar todas muy generoso de tu parte
Colour
Hi oSheet:Cells( 5, 10 ):Value="*ABC" How to say "*" in red and "ABC" in black. Thanks ACWoo Using FWH + bcc582 
Colour
oSheet:Cells(5,10):Characters(1,1):Font:Color := CLR_HRED oSheet:Cells(5,10):Characters(2,3):Font:Color := CLR_BLACK
Colour
Thanks It works. Regards ACWoo
Colouring TwBrowse ( Hernan's )
Hello ! At this time TwBrowse have 2 possibilities to colour background of active row - logic lCellStyle . If choose ! lCellStyle , then all active row coloured with one color and the active cell too . I want to do something mix of both styles - paint active row with wanted color and underline with other color active cell . Is it possible ? Here is my own background painting for bBkColor color : METHOD GrPair( nRow, nCol, nStyle, oSel, nFtr ) CLASS TWBrowse // Rimantas U. local nClr := ::nClrPane default nFtr := NIL if nStyle == 1 .or. nStyle == 2 // headers and footers nClr := GetSysColor( 15 ) if nStyle == 1 .and. nFtr # NIL if nFtr == nCol nClr := nRGB( 192, 192, 192 ) endif endif elseif nStyle == 3 // active cells nClr := GetSysColor( 13 ) if ( ::lCellStyle .and. nCol == ::nColAct ) .or. !::lCellStyle if oSel <> NIL .and. oSel:lSelect nClr := nRGB( 128, 128, 128 ) // CLR_GRAY endif endif elseif nStyle == 0 // normal cells if oSel <> NIL .and. oSel:lSelect nClr := nRGB( 192, 192, 192 ) // CLR_HGRAY else if ::aGrPair[ 1 ] # ::aGrPair[ 2 ] if ::nGrRec != if( upper( ::cAlias ) # "ARRAY", ( ::cAlias )->( recno() ), ::nAt ) .and. ::lScrolling ::nGrRec := if( upper( ::cAlias ) # "ARRAY", ( ::cAlias )->( recno() ), ::nAt ) nClr := ::aGrPair[ 1 ] ::aGrPair[ 1 ] := ::aGrPair[ 2 ] ::aGrPair[ 2 ] := nClr endif if nRow % 2 == 0 nClr := ::aGrPair[ 2 ] else nClr := ::aGrPair[ 1 ] endif else nClr := NIL endif // for active row if nRow == ::nRowPos nClr := nRGB( 0, 200, 255 ) endif endif endif return( nClr ) The problem : repainting of background after moving with Up and Down keys . It leave the same background colour an the previuos line . I tried to correct GoUp() and GoDown() methods adding Refresh . It did the job , but it slowness browse too .. :-(( . With PgDown and PgUp it works OK , because here its repainting of all browse . Maybe you can help me in this situation ? With best regards ! Rimantas .
Colouring TwBrowse ( Hernan's )
Hi ! After some tests I did what I wanted . Maybe it's not so good solution , but that works fine . In GoUp and GoDown methods I added some lines : METHOD GoUp() CLASS TWBrowse local nSkipped local nLines := ::nRowCount() // 2 new lines here local nRowPrv := ::nRowPos local nRecNew := nRecPrv := ( ::cAlias )->( recno() ) if ( ::nLen := Eval( ::bLogicLen ) ) < 1 return nil endif if ! ::lHitTop ::DrawLine() if ::Skip( -1 ) == -1 ::lHitBottom := .f. if ::nRowPos > 1 ::nRowPos-- else ::lScrolling := .T. //fgam WBrwScrl( ::hWnd, -1, If( ::oFont != nil, ::oFont:hFont, 0 ), ::nLineStyle ) endif else ::lHitTop := .t. endif ::DrawSelect() if ::oVScroll != nil If ::bLogicPos != Nil // By CeSoTech ::oVScroll:SetPos( _POSVSCROLL_ ) else ::oVScroll:GoUp() endif endif // it's needful to repaint previuos line // ::lCellMix , my new parameter if !::lHitTop .and. ::lCellStyle .and. ::lCellMix if nRowPrv == 1 // if go up at the top of browse nRowPrv ++ endif nRecNew := ( ::cAlias )->( recno() ) ( ::cAlias )->( dbgoto( nRecPrv ) ) ::DrawLine( nRowPrv ) ( ::cAlias )->( dbgoto( nRecNew ) ) endif if ::bChange != nil Eval( ::bChange, Self ) endif endif return nil //----------------------------------------------------------------------------// METHOD GoDown() CLASS TWBrowse local nSkipped local nLines := ::nRowCount() local nRecPrv := ( ::cAlias )->( recno() ) local nRowPrv := ::nRowPos local nRecNew if ( ::nLen := Eval( ::bLogicLen ) ) < 1 return nil endif if ! ::lHitBottom ::DrawLine() if ::Skip( 1 ) == 1 ::lHitTop := .f. if ::nRowPos < nLines ::nRowPos++ else ::lScrolling := .T. //fgam WBrwScrl( ::hWnd, 1, If( ::oFont != nil, ::oFont:hFont, 0 ), ::nLineStyle ) endif else ::lHitBottom := .t. endif ::DrawSelect() if ::oVScroll != nil If ::bLogicPos != Nil // By CeSoTech ::oVScroll:SetPos( _POSVSCROLL_ ) else ::oVScroll:GoDown() endif endif if !::lHitBottom .and. ::lCellStyle .and. ::lCellMix if nRowPrv == nLines nRowPrv -- endif nRecNew := ( ::cAlias )->( recno() ) ( ::cAlias )->( dbgoto( nRecPrv ) ) ::DrawLine( nRowPrv ) ( ::cAlias )->( dbgoto( nRecNew ) ) endif if ::bChange != nil Eval( ::bChange, Self ) endif endif return nil Now I'm seeing actual row in selected color and with active cell . One my customer asked about that possibility , because it's more easy to detect in which row you are and then only with <- and -> keys you can go to needful column and then press enter to correct data . With best regards ! Rimantas .
Colouring TwBrowse ( Hernan's )
Just curious if you are using Borland or MSVC as your C++ compiler. I would like to be able to re-compile TWbrowse with Microsoft but am hung up on the naitave .c code. Rick Lipkin SC Dept of Health, USA
Colouring TwBrowse ( Hernan's )
[quote="Rick Lipkin"]Just curious if you are using Borland or MSVC as your C++ compiler. I would like to be able to re-compile TWbrowse with Microsoft but am hung up on the naitave .c code. Hi Rick ! I can't to run FWH with MS C++ compiler . It seems that my olds FWH libraries ( 2.5 ver of 2004 October ) are buggies for that compiler . Antonio , as ussual , promised to view about that . But that was promise ... So I leaved with BC ++ . With best regards ! Rimantas .
Colouring TwBrowse ( Hernan's )
Also I did this my paint fully - as for DBF as for array . For mouse move too . It works fine . I did one method : METHOD LineRepaint( nRowPrv, nRecPrv, nDirection ) CLASS TWBrowse local nRecNew := if( upper( ::cAlias ) != "ARRAY", ( ::cAlias )->( recno() ), ::nAt ) default nDirection := 0 if ::lCellStyle if nDirection == 1 if !::lHitTop .and. nRowPrv == 1 nRowPrv ++ endif elseif nDirection == 2 if !::lHitBottom .and. nRowPrv == ::nRowCount() nRowPrv -- endif endif if nRowPrv # ::nRowPos if upper( ::cAlias ) != "ARRAY" ( ::cAlias )->( dbgoto( nRecPrv ) ) else ::nAt := nRecPrv endif ::DrawLine( nRowPrv ) if upper( ::cAlias ) != "ARRAY" ( ::cAlias )->( dbgoto( nRecNew ) ) else ::nAt := nRecNew endif endif endif return( NIL ) And in GoUp, GoDown, LButtonDow, PageDown I added this method after ::DrawSelect() . In mentioned methods two vars added : local nRowPrv := ::nRowPos local nRecPrv := if( upper( ::cAlias ) # "ARRAY", ( ::cAlias )->( recno() ), ::nAt ) only in GoUp and GoDown nDirection it's needful . Because if you reach browse top and bottom , but don't lHitTop and lHitBottom , then only this lines are repainted , so it's needful ++ or -- for this the previuos line . With best regards ! Rimantas
Colouring TwBrowse ( Hernan's )
Rimantas, [quote="Rimantas":3tyfcv3r]It seems that my olds FWH libraries ( 2.5 ver of 2004 October ) are buggies for that compiler . Antonio , as ussual , promised to view about that. But that was promise ... So I leaved with BC ++.[/quote:3tyfcv3r] Its an old version and new Microsoft compiler versions. We can't make miracles, sorry <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Colouring TwBrowse ( Hernan's )
[quote="Antonio Linares":1pa2em5r]Rimantas, Its an old version and new Microsoft compiler versions. We can't make miracles, sorry <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->[/quote:1pa2em5r] Excuse , Antonio , but I can't agree . When I buyed FWH I don't checked have bugs your libs for MS compiler or not . But in my opinion , your libs must be without bugs . So please , give me information which MS compiler works with your libs ( 2004 October ) or give libs without bugs . With best regards ! Rimantas
Colouring TwBrowse ( Hernan's )
Rimantas, Tell me a software product that does not have bugs. Software is constantly in evolution, towards a new version, with more functionality and as few bugs as possible. FWH 2.4 version has more than two years. Our software is constantly evolving, and its quite difficult to support a two years old version.
Colouring TwBrowse ( Hernan's )
[Tell me a software product that does not have bugs. Software is constantly in evolution, towards a new version, with more functionality and as few bugs as possible. FWH 2.4 version has more than two years. Our software is constantly evolving, and its quite difficult to support a two years old version.[/quote] All other softwares have freely accessible correction of bugs . I buyed your libs at 2004 September , you let me upgrade to October version also , because you promised for that ActiveX support . That's OK . With BCC all is working . Today is 2005 October. One year passed . At July-August I tried your libs with MS VC and found that they are buggy . But it's true to believe , that at this time from 2004.09 to 2005.07 nothing was working with 2004.09-10 FWH versions with MS VC compiler and that they buyed new version for that compiler , without bugs ... Of course , I can't to direct how to organize your own job . But ... I think that this discusion is a waste of time . Because I don't have any means for you to correct libs or something similar . And you and I have own trues and opinions . So good luck to you , please , create software without bugs <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> . Be more careful . With best regards ! Rimantas .
Colouring TwBrowse ( Hernan's )
Rimantas, > At July-August I tried your libs with MS VC and found that they are buggy Could you please describe what bugs are them and how to reproduce them ? Thanks.
Colouring TwBrowse ( Hernan's )
[quote="Antonio Linares":2por9vnz]Rimantas, > At July-August I tried your libs with MS VC and found that they are buggy Could you please describe what bugs are them and how to reproduce them ? Thanks.[/quote:2por9vnz] Of course ! At first I tried to build FWH samples with MS VC ( mine Visual studio 98 , VC++ 6 ver. ) . xHarbour binaries downloaded from xHarbour.org ( 0.99.50 version ) . I only changed needful paths in your buildxm.bat . All buildings of samples are stopped on the same error . Log of trying to build testtcbr : rtl.lib(dateshb.obj) : warning LNK4006: "void __cdecl HB_FUN_STOD(void)" (?HB_FUN_STOD@@YAXXZ) already defined in FiveHCM.lib(OR.obj); second definition ignored rtl.lib(math.obj) : warning LNK4006: __matherr already defined in LIBC.lib(matherr.obj); second definition ignored FiveHCM.lib(FFDLGPRC.obj) : error LNK2001: unresolved external symbol "struct METHOD * __cdecl hb_objGetpMethod(struct _HB_ITEM *,struct HB_SYMB *)" (?hb_objGetpMethod@@YAPAUMETHOD@@PAU_HB_ITEM@@PAUHB_SYMB@@@Z) testtcbr.exe : fatal error LNK1120: 1 unresolved externals In all builds the same : the 2 warnings and the error on FFDLGPRC.obj . Maybe it's the only one bug . Sorry , but my compilation allways stopped on this error and I don't know exist them more or not ... With best regards ! Rimantas .
Colouring TwBrowse ( Hernan's )
[quote="Antonio Linares":54hcrqq1]Rimantas, Tell me a software product that does not have bugs. Software is constantly in evolution, towards a new version, with more functionality and as few bugs as possible. FWH 2.4 version has more than two years. Our software is constantly evolving, and its quite difficult to support a two years old version.[/quote:54hcrqq1] Excuse me , I mixed up years and version <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> . Mine is FWH 2.5 of 2004 October . With best regards !
Colouring TwBrowse ( Hernan's )
[quote="Antonio Linares":2m2fnwaz]Rimantas, > At July-August I tried your libs with MS VC and found that they are buggy Could you please describe what bugs are them and how to reproduce them ? Thanks.[/quote:2m2fnwaz] Excuse me , but maybe I'm not so patient <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> . Are any news about that ? With best regards ! Rimantas .
Column Function in XBROWSE
hi to all, I would Like a column in XBROWSE with result of function: [code=fw:yuxx3n48]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />oRs := FW_OpenRecordSet<span style="color: #000000;">&#40;</span> oCn, tuple, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />@ <span style="color: #000000;">40</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-50</span> <span style="color: #0000ff;">PIXEL</span> ;<br />RECORDSET oRs ;<br />      COLUMNS <span style="color: #ff0000;">"ONE"</span>, <span style="color: #ff0000;">"TWO"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"B"</span>,  <span style="color: #ff0000;">'MYFUNCTION(fieldC)'</span> ;<br />      <span style="color: #0000ff;">OF</span> oDlg2  <br />....<br /><br /><span style="color: #00C800;">FUNCTION</span> MYFUNCTION<span style="color: #000000;">&#40;</span>fieldC<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> x = <span style="color: #000000;">0</span><br />x = fieldc * x<br /><span style="color: #00C800;">return</span> x<br /> </div>[/code:yuxx3n48] but in xbrowse I get costant MYFUNCTION(fieldC) in fifth column instead of x value. any help? thank you
Column Function in XBROWSE
Try removing the single quotes around the function. EMG
Column Function in XBROWSE
hi Enrico, thank you for your help but if I remove single quote xbrowse goes in myfunction only one time. I changed my prg: [code=fw:1ivnykmi]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />oYORD := FW_OpenRecordSet<span style="color: #000000;">&#40;</span> oCn, tuple, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />oYORD:<span style="color: #000000;">MoveFirst</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">800</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span>  <span style="color: #0000ff;">FONT</span> oFont;<br /><span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;<br />              WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME <span style="color: #000000;">&#41;</span> ;<br />              <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"ANALISI IMPLOSIONE: "</span>+m_get<span style="color: #000000;">&#91;</span><span style="color: #000000;">02</span><span style="color: #000000;">&#93;</span><br /><br />@ <span style="color: #000000;">40</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-50</span> <span style="color: #0000ff;">PIXEL</span> ;<br />     RECORDSET oYord ;<br />  COLUMNS <span style="color: #ff0000;">"LEVEL"</span>, <span style="color: #ff0000;">"FIELD1"</span>, <span style="color: #ff0000;">"FIELD2"</span>, <span style="color: #ff0000;">"TIPO"</span>, <span style="color: #ff0000;">"TIME"</span>, <span style="color: #ff0000;">"PROGR"</span>, MRP00421<span style="color: #000000;">&#40;</span>oYORD:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"FIELD1"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">value</span>,oCn<span style="color: #000000;">&#41;</span> ;<br />  HEADERS <span style="color: #ff0000;">"LIV"</span>, <span style="color: #ff0000;">"BASE"</span>, <span style="color: #ff0000;">"APERTO"</span>, <span style="color: #ff0000;">"TIPO"</span>, <span style="color: #ff0000;">"LEAD"</span>, <span style="color: #ff0000;">"PROGR"</span>, <span style="color: #ff0000;">"IN ORDINE"</span> ;<br />  <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@ZE 999"</span>,,,,<span style="color: #ff0000;">"@ZE 999"</span>, <span style="color: #ff0000;">"@ZE 999"</span> ;<br />  <span style="color: #0000ff;">OF</span> oDlg2 <br />...<br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br /><br />*-----------------------------------------------------------------------------------<br /><span style="color: #00C800;">FUNCTION</span> MRP00421<span style="color: #000000;">&#40;</span>field, oCn<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> tuple, oRs<br /><span style="color: #00C800;">local</span> totale := <span style="color: #000000;">0</span><br /><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span>Field<span style="color: #000000;">&#41;</span><br /><br />    tuple := +;<br />    <span style="color: #ff0000;">"SELECT a.Totale as Totale..."</span> +;<br />       etc...etc...etc...<br />    <span style="color: #ff0000;">"WHERE ARTICOLO = '"</span>+FIELD+<span style="color: #ff0000;">"' AND WORKIT = 8 "</span><br />       etc... etc...<br /><br />oRs := FW_OpenRecordSet<span style="color: #000000;">&#40;</span> oCn, tuple, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">if</span> oRs:<span style="color: #000000;">EOF</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    totale = <span style="color: #000000;">0.00</span><br /><span style="color: #00C800;">else</span><br />    oRs:<span style="color: #000000;">MoveFirst</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    totale = oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Totale"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">value</span><br />    <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>totale<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br />oRs:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> Str<span style="color: #000000;">&#40;</span>Totale<span style="color: #000000;">&#41;</span><br /> </div>[/code:1ivnykmi] I put MSGINFO into FUNCTION MRP00421 for check FIELD and it shows me msginfo only one time with NULL field. the original RECORDSET oYord in XBROWSE had 25 rows and MRP00421 function should return calculate TOTALE (in another SELECT) for each row. but COLUMN "IN ORDINE" in XBROWSE retrun 0,00 in each row I have another my XBROWSE: [code=fw:1ivnykmi]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">800</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span>  <span style="color: #0000ff;">FONT</span> oFont;<br />    <span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;<br />              WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME <span style="color: #000000;">&#41;</span> ;<br />              <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"SCHEDA MOVIMENTI DI ACQUISTO FORNITORE: "</span>+CDFOR<br /><br />    @ <span style="color: #000000;">40</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-50</span> <span style="color: #0000ff;">PIXEL</span> ;<br />      RECORDSET oRsMovimenti ;<br />      COLUMNS <span style="color: #ff0000;">'dAAAAMMGGadata(DATA)'</span>,<span style="color: #ff0000;">"CODICE"</span>,<span style="color: #ff0000;">"DESCR"</span>,<span style="color: #ff0000;">"RIFER"</span>,<span style="color: #ff0000;">"QTA"</span>,<span style="color: #ff0000;">"IMPORT"</span>,<span style="color: #ff0000;">"COSTO"</span> ;<br />      HEADERS <span style="color: #ff0000;">"DATA"</span>,<span style="color: #ff0000;">"CODICE"</span>,<span style="color: #ff0000;">"DESCRIZIONE"</span>,<span style="color: #ff0000;">"RIFERIM."</span>,<span style="color: #ff0000;">"QUANTITA"</span>,<span style="color: #ff0000;">"IMPORTO"</span>,<span style="color: #ff0000;">"COSTO"</span> ;<br />      <span style="color: #0000ff;">PICTURE</span> ,,,,<span style="color: #ff0000;">"@ZE 99,999,999.999"</span>, <span style="color: #ff0000;">"@ZE 99,999,999.999"</span>, <span style="color: #ff0000;">"@ZE 99,999,999.999"</span> ;</div>[/code:1ivnykmi] in this XBROWSE there is dAAAAMMGGadata FUNCTION whit single quotes that convert field DATA from YYYYMMDD to DD/MM/YYYY and it works for each row in oRsMovimenti thank you
Column Function in XBROWSE
Sorry, let's wait for Rao advice. EMG
Column Function in XBROWSE
Hi , When i have to do that, i insert a column and use a code block with my function : oCol:=oLbxp:inscol(4) oCol:bStrData:={||QSTOCK(oRsp:Fields("NB"):Value)} oCol:cHeader:="Total" * * function QSTOCK(p) return p/2 Philippe .
Column Function in XBROWSE
Hola, try to use a codeblock [code=fw:2l0fs7ny]<div class="fw" id="{CB}" style="font-family: monospace;">oRs := FW_OpenRecordSet<span style="color: #000000;">&#40;</span> oCn, tuple, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />@ <span style="color: #000000;">40</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-50</span> <span style="color: #0000ff;">PIXEL</span> ;<br />RECORDSET oRs ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">"ONE"</span>, <span style="color: #ff0000;">"TWO"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"B"</span>, &nbsp;<span style="color: #000000;">&#123;</span>|| MYFUNCTION<span style="color: #000000;">&#40;</span>fieldC<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg2 &nbsp;<br />....<br /><br /><span style="color: #00C800;">FUNCTION</span> MYFUNCTION<span style="color: #000000;">&#40;</span>fieldC<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> x = <span style="color: #000000;">0</span><br />x = fieldc * x<br /><span style="color: #00C800;">return</span> x</div>[/code:2l0fs7ny] But here we have a performance problem, because xBrowse repaint many time all the data Regards Marcelo
Column Function in XBROWSE
hi thank you for your help If I use codeblock, performance is very very slow. I do not understand because If I use function 'dAAAAMMGGadata(DATA)' that works and with 'MRP00421(oYORD:Fields("FIELD1"):value,oCn)' not works
Column Function in XBROWSE
COLUMNS "ONE", "TWO", "A", "B", { || MYFUNCTION(fieldC) } ;
Column Function in XBROWSE
thank you Mr.Rao but is very slowly with codeblock. why in a XBROWSE 'dAAAAMMGGadata(DATA)' works and 'MYFUNCTION(DATA1)' no ?
Column Function in XBROWSE
Speed depends purely on the implementation of the function. [quote:9pm48u1x]why in a XBROWSE 'dAAAAMMGGadata(DATA)' works and 'MYFUNCTION(DATA1)' no ?[/quote:9pm48u1x] If the function is a public function ( i.e., not a static function ) and all parameters are either public/private or field variables, "MYFUNCTION(PARAMETERS)" works. In other words, XBrowse should be able to call the function with the parameters from inside xbrowse. Otherwise, you need to use it as codeblock.