topic
stringlengths
1
63
text
stringlengths
1
577k
Color error in tPrinter.prg
Hello Tim, try Fivewin’s EasyReport. Best regards Otto [img:23qasng7]https://mybergland.com/FWForum/fontcolor.jpg[/img:23qasng7] [img:23qasng7]https://mybergland.com/FWForum/fontcolor1.jpg[/img:23qasng7]
Color error in tPrinter.prg
Otto, All of my work is done with tPrinter. I have a lot of reports and want to bring color to them. I started with an Invoice ( very complex ) and it is working fine ( except the background colors ). I brought this up because I believe it is a bug in the tPrinter class. I can do the fix, but it should be done in the distribution libraries or I will have to fix every release. For the Say( ), if the value passed is ! NIL, the current color should be saved, and after execution of the print line, it should be restored. Tim
Color fondo de un TXBrowse
Estimados, Como se puede cambiar el color de fondo de un xBrowse, normalmente es fondo blanco y, quisiera cambiarlo a un color amarillo, por ejemplo. Cual es la forma correcta de hacerlo?
Color fondo de un TXBrowse
1.- Puedes Usar oBrw:Setcolor( CLR_WHITE, CLR_BLACK ) 2.- En \Fwh\ Manual\ estan los archivos de ayuda y documentacion de la clase 3.- <!-- m --><a class="postlink" href="http://wiki.fivetechsoft.com/doku.php">http://wiki.fivetechsoft.com/doku.php</a><!-- m --> 4.- Revisa la clase TXBrowse Original 5.- Hay que leer un poquito \FWH\source\classes\xbrowse.prg , alli veras los
Color get en rojo si es negativo...Anexo imagen
Hola buenas tardes amigos,como estan, espero que bien.! Andube buscando por el foro al igual en los samples, pero no encontre nada parecido a lo que quiero hacer en los campos de gets de Cargos y Abonos. Resulta que al teclear un importe negativo que me muestre en color [color=#FF0000:y10v6e9m]rojo[/color:y10v6e9m],pero no logro dar con el resultado de lo que quiero hacer, para mayor comprension lo que quiero hacer,adjunto la imagen de un ejemplo de un sistema de contabilidad de ContPaq. Gracias , no pude subirlo en 4shared, pero si logre con el imageshack.com [img:y10v6e9m]https&#58;//imageshack&#46;com/i/giisrtj[/img:y10v6e9m] [url:y10v6e9m]https&#58;//imageshack&#46;com/i/giisrtj[/url:y10v6e9m] [img:y10v6e9m]https&#58;//imageshack&#46;com/i/giisrtj[/img:y10v6e9m] Que me muestre el caracter del texto del importe en rojo, cuando es negativo, y si no es negativo, que me muestre el caracter a su color normal. Saludos
Color get en rojo si es negativo...Anexo imagen
acá: <!-- w --><a class="postlink" href="http://www.4shared.com">www.4shared.com</a><!-- w --> salu2
Color get en rojo si es negativo...Anexo imagen
[code=fw:ifljpj6g]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oLbx FIELDS <span style="color: #ff0000;">""</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"AUDITOR"</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">Set3DStyle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">lHScroll</span> := .F.<br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">bLine</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> AUDITOR->USUARIO, AUDITOR->NIVEL, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CVALTOCHAR<span style="color: #000000;">&#40;</span>AUDITOR->FECHA<span style="color: #000000;">&#41;</span>, AUDITOR->HORA, AUDITOR->ACCION<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">aHeaders</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Usuario"</span>,<span style="color: #ff0000;">"Privilegio"</span>,<span style="color: #ff0000;">"Fecha"</span>,<span style="color: #ff0000;">"Hora"</span>,<span style="color: #ff0000;">"Acción Realizada"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">aHJustify</span> := <span style="color: #000000;">&#123;</span><span style="color: #000000;">2</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//-> Mudar a cor</span><br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">nClrPane</span> := <span style="color: #000000;">&#123;</span>|| IIF<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>oLbx:<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>OrdKeyNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>%<span style="color: #000000;">2</span>=<span style="color: #000000;">0</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span>, ColorDia<span style="color: #000000;">&#40;</span>AUDITOR->FECHA<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">lAdjLastCol</span> := .T.<br />&nbsp; &nbsp; oLbx:<span style="color: #000000;">lAdjBrowse</span> := .T.<br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ColorDia<span style="color: #000000;">&#40;</span>dDate<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> cRGBColor:= <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> nDia:= <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; nDia:= STRZERO<span style="color: #000000;">&#40;</span>DAY<span style="color: #000000;">&#40;</span>dDate<span style="color: #000000;">&#41;</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> nDia == <span style="color: #ff0000;">"01"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">253</span>,<span style="color: #000000;">196</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"02"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">208</span>,<span style="color: #000000;">202</span>,<span style="color: #000000;">183</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"03"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">222</span>,<span style="color: #000000;">235</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"04"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">206</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">196</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"05"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">235</span>,<span style="color: #000000;">206</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"06"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">194</span>,<span style="color: #000000;">230</span>,<span style="color: #000000;">253</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"07"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">238</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"08"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">173</span>,<span style="color: #000000;">207</span>,<span style="color: #000000;">247</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"09"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">228</span>,<span style="color: #000000;">222</span>,<span style="color: #000000;">203</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"10"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">180</span>,<span style="color: #000000;">222</span>,<span style="color: #000000;">185</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"11"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">217</span>,<span style="color: #000000;">228</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"12"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">202</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">239</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"13"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">226</span>,<span style="color: #000000;">204</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"14"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">246</span>,<span style="color: #000000;">220</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"15"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">226</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">216</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"16"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">250</span>,<span style="color: #000000;">222</span>,<span style="color: #000000;">237</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"17"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">251</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">224</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"18"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">234</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">211</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"19"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">210</span>,<span style="color: #000000;">211</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"20"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">240</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"21"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">217</span>,<span style="color: #000000;">222</span>,<span style="color: #000000;">180</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"22"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">254</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">231</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"23"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">231</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">204</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"24"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">211</span>,<span style="color: #000000;">235</span>,<span style="color: #000000;">184</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"25"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">246</span>,<span style="color: #000000;">224</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"26"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">230</span>,<span style="color: #000000;">231</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"27"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">239</span>,<span style="color: #000000;">235</span>,<span style="color: #000000;">222</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"28"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">233</span>,<span style="color: #000000;">176</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"29"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">231</span>,<span style="color: #000000;">239</span>,<span style="color: #000000;">222</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"30"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">213</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; ELSEIF nDia == <span style="color: #ff0000;">"31"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cRGBColor:= nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">248</span>,<span style="color: #000000;">242</span>,<span style="color: #000000;">223</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> cRGBColor <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//</span><br /><br />ó<br /><br /><span style="color: #B900B9;">//</span><br />:<span style="color: #000000;">bClrStd</span>:=ClrStd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #B900B9;">//----------------------- </span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ClrStd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><span style="color: #B900B9;">//----------------------- </span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aCol:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> alias-><span style="color: #000000;">&#40;</span>ordkeyno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span> <br />&nbsp; &nbsp; &nbsp; aCol:=<span style="color: #000000;">&#123;</span>CLR_BLACK, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">193</span>,<span style="color: #000000;">221</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span> <br />&nbsp; &nbsp; &nbsp; aCol:=<span style="color: #000000;">&#123;</span>CLR_BLACK, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">221</span>,<span style="color: #000000;">245</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span> <br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> aCol <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:ifljpj6g]
Color get en rojo si es negativo...Anexo imagen
O tambien: <!-- m --><a class="postlink" href="https://imageshack.com/">https://imageshack.com/</a><!-- m -->?
Color get en rojo si es negativo...Anexo imagen
[quote="cnavarro":1omphmzi]O tambien: [url]https://imageshack.com/?[/url][/quote:1omphmzi] Alguien tiene idea de lo que quiero hacer ?.... Saludos.
Color get en rojo si es negativo...Anexo imagen
Creo que si es tecleandolo y que luego se ponga rojo, puedes usar el color del texto bajo condicion despues que el get pierda el focus, dependiendo si el valor es menor q cero, entonces pones letras en rojo con el fondo como quieras, de lo contrario, lo dejas como esta o colocas algun color, es la idea, nose si hacerlo es tan facil como decirlo, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Color get en rojo si es negativo...Anexo imagen
Yo no se si hay un PICTURE que haga automaticamente eso cuando detecta en un campo numérico que se escriba el carácter `-` Puedes probar asi @ nf, nC GET oGet VAR nGet .... ; VALID (if( oGet:VarGet() < 0, (oGet:SetColor( CLR_HRED, CLR_WHITE ),oGet:Refresh(), .T.), .T. )) Aunque si funciona, yo crearía una función pasando el objeto get y que siempre devuelva .T. y así no te producirá problemas con el resto de VALIDs que puedas tener en los GETs definidos y en los que tengas que aplicarlo Espero te sirva de algo
Color get en rojo si es negativo...Anexo imagen
[quote="cnavarro":3a930ogv]Yo no se si hay un PICTURE que haga automaticamente eso cuando detecta en un campo numérico que se escriba el carácter `-` Puedes probar asi @ nf, nC GET oGet VAR nGet .... ; VALID (if( oGet:VarGet() < 0, (oGet:SetColor( CLR_HRED, CLR_WHITE ),oGet:Refresh(), .T.), .T. )) Aunque si funciona, yo crearía una función pasando el objeto get y que siempre devuelva .T. y así no te producirá problemas con el resto de VALIDs que puedas tener en los GETs definidos y en los que tengas que aplicarlo Espero te sirva de algo[/quote:3a930ogv] Gracias a todos los que me respondieron, muchas gracias y gusto saludarles.
Color ob disabled objects
Hi Antonio. I saw that you can show the disabled get in a dialog using the ldiscolors parameter that show the get with a normal color, not the light gray of windows. If you have in a dialog some checkboxes, radios, combobox of multiple line gets, the color is always a light gray, that in some cases are really difficult to see. Is possible to change the disabled color of these objects ? Thanks a lot.
Color ob disabled objects
Giuliano, With GETs its easier, but with other controls its more complex as we have to do the painting of the controls ourselves.
Color ob disabled objects
With multiline gets is it possible ? Thanks
Color ob disabled objects
Giuliano, You may use the multiline GET clause READONLY, so it can not be edited, but it displays as enabled.
Color of Combobox on Windows 10 .. Greyish
To All I have noticed that the color of the combobox on Windows 10 turns a 'grey' color .. if one did not know, they would think the combobox was disabled. Here is the code .. any advice would be helpful. Rick Lipkin [code=fw:d2iyuscd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oTime  <span style="color: #0000ff;">VAR</span> cTime       <span style="color: #0000ff;">ID</span> <span style="color: #000000;">114</span> <span style="color: #0000ff;">of</span> oGrps ;<br />         <span style="color: #0000ff;">ITEMS</span> aTime<br />         oTime:<span style="color: #000000;">lIncSearch</span> = .T.<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oTime_Back  <span style="color: #0000ff;">var</span> cTime_Back <span style="color: #0000ff;">ID</span> <span style="color: #000000;">117</span> <span style="color: #0000ff;">of</span> oGrps ;<br />         <span style="color: #0000ff;">ITEMS</span> aTime_Back<br />         oTime_Back:<span style="color: #000000;">lIncSearch</span> = .T.<br /><br /> </div>[/code:d2iyuscd] [img:d2iyuscd]http&#58;//i68&#46;tinypic&#46;com/2h30xgn&#46;jpg[/img:d2iyuscd]
Color of Combobox on Windows 10 .. Greyish
It is a "feature" of W10. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Color of Combobox on Windows 10 .. Greyish
Enrico Thanks .. do you know of a way to manually set the appearance, foreground and text to any color ? Rick Lipkin
Color of Combobox on Windows 10 .. Greyish
Rick, it seems that we cannot change the appearence of a themed control. EMG
Color of Combobox on Windows 10 .. Greyish
Dear All, Can we still not change colors of COMBOBOX (Dropdown List) from resource? [quote="Enrico Maria Giordano":3vjuwern]Rick, it seems that we cannot change the appearence of a themed control. EMG[/quote:3vjuwern]
Color of rows in the cell
Hi, To display lines in different colors in the xbrowse cell, I specify aCols [1]: aClrText: = {CLR _ BLACK, CLR_RED}. Is it possible to make this setting not for all xBrose lines, but according to a certain condition ?
Color of rows in the cell
[code=fw:3jvxmtjx]<div class="fw" id="{CB}" style="font-family: monospace;"><br />....<br />....<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrStd</span> &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; := &nbsp;<span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>Len<span style="color: #000000;">&#40;</span> aDeta <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> CLR_BLACK,clrEstFondo<span style="color: #000000;">&#40;</span>aDeta<span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"estado"</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> CLR_BLACK,clrEstFondo<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"S"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrSelFocus</span> &nbsp; &nbsp; &nbsp; := &nbsp;<span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>Len<span style="color: #000000;">&#40;</span> aDeta <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> CLR_WHITE,clrEstSelec<span style="color: #000000;">&#40;</span>aDeta<span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"estado"</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> CLR_WHITE,clrEstSelec<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"S"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>&nbsp; &nbsp;<br /><br /><br />....<br />....<br /><br /><br />****************************<br />*CAMBIA EL <span style="color: #0000ff;">COLOR</span> DE LA CELDA<br />****************************<br /><span style="color: #00C800;">Function</span> clrEstFondo<span style="color: #000000;">&#40;</span>valor<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">If</span> valor==<span style="color: #ff0000;">"S"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Blanco</span><br />ElseIf valor==<span style="color: #ff0000;">"N"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">187</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">187</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Verde Claro</span><br />ElseIf valor==<span style="color: #ff0000;">"M"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">187</span>,<span style="color: #000000;">187</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Azul Claro</span><br />ElseIf valor==<span style="color: #ff0000;">"B"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">187</span>,<span style="color: #000000;">187</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Rojo Claro</span><br /><span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Blanco</span><br /><span style="color: #00C800;">Endif</span><br /><br />*****************************************<br />*CAMBIA EL <span style="color: #0000ff;">COLOR</span> DE LA CELDA SELECCIONADO<br />*****************************************<br /><span style="color: #00C800;">Function</span> clrEstSelec<span style="color: #000000;">&#40;</span>valor<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">If</span> valor==<span style="color: #ff0000;">"S"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">117</span>, <span style="color: #000000;">186</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br />ElseIf valor==<span style="color: #ff0000;">"N"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">210</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Verde Oscuro</span><br />ElseIf valor==<span style="color: #ff0000;">"M"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">119</span>,<span style="color: #000000;">119</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Azul Oscuro</span><br />ElseIf valor==<span style="color: #ff0000;">"B"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">117</span>,<span style="color: #000000;">117</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Rojo Oscuro</span><br /><span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; <span style="color: #00C800;">Return</span> RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">117</span>, <span style="color: #000000;">186</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>&nbsp;<br /><span style="color: #00C800;">Endif</span><br /><br /><br />&nbsp;</div>[/code:3jvxmtjx]
Color of rows in the cell
This is an example for the whole cell, but I asked about coloring the lines in the cell with different colors. tex1+CRLF+text2+CRLF+text3
Color of rows in the cell
[quote="Natter":1sj0kxhe]Hi, To display lines in different colors in the xbrowse cell, I specify aCols [1]: aClrText: = {CLR _ BLACK, CLR_RED}. Is it possible to make this setting not for all xBrose lines, but according to a certain condition ?[/quote:1sj0kxhe] [code=fw:1sj0kxhe]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, oCol, oFont, oBold, oItalic, oImpact<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aClr1 := <span style="color: #000000;">&#123;</span> CLR_HRED,CLR_GREEN,CLR_HBLUE <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aClr2 := <span style="color: #000000;">&#123;</span> CLR_HBLUE,CLR_HRED,CLR_GREEN <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"123"</span>, <span style="color: #ff0000;">"ONE"</span> + CRLF + <span style="color: #ff0000;">"JANUARY"</span> + CRLF + <span style="color: #ff0000;">"MONDAY"</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"234"</span>, <span style="color: #ff0000;">"TWO"</span> + CRLF + <span style="color: #ff0000;">"FEBRUARY"</span> + CRLF + <span style="color: #ff0000;">"TUESDAY"</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"345"</span>, <span style="color: #ff0000;">"THREE"</span> + CRLF + <span style="color: #ff0000;">"MARCH"</span> + CRLF + <span style="color: #ff0000;">"WEDNESDAY"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oImpact &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"IMPACT"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-35</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"VERDANA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-18</span> BOLD<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oItalic &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Times New Roman"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-16</span> BOLD ITALIC<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont<br /><br /><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE aData <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nDataStrAligns</span> &nbsp; := AL_CENTER<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;">oDataFont</span> &nbsp; := oImpact<br />&nbsp; &nbsp; &nbsp; WITH OBJECT <span style="color: #000000;">&#40;</span> oCol := oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">aDataFont</span> &nbsp;:= <span style="color: #000000;">&#123;</span> oBold, oFont, oItalic <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bClrStd</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || oCol:<span style="color: #000000;">aClrText</span> &nbsp; := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">KeyNo</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, aClr1, aClr2 <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, CLR_WHITE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; END<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRowHeight</span> &nbsp; &nbsp;:= <span style="color: #000000;">100</span><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;END<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oBold, oItalic, oImpact<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:1sj0kxhe] [url=https&#58;//imageshack&#46;com/i/pmBSX7Qcp:1sj0kxhe][img:1sj0kxhe]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/922/BSX7Qc&#46;png[/img:1sj0kxhe][/url:1sj0kxhe]
Color of rows in the cell
Thank you, Rao!
Color of rows in the cell
[b:v3wozy8t]Simplification in the next version:[/b:v3wozy8t] 1) aDataFont and aClrText can also be codeblocks. These codeblocks are evaluated with two params, viz, the column object and lHiLite. The above code can be written like this: [code=fw:v3wozy8t]<div class="fw" id="{CB}" style="font-family: monospace;">WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">aClrText</span> &nbsp; := <span style="color: #000000;">&#123;</span> |oCol,lHilite| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lHilite, <span style="color: #000000;">&#123;</span> CLR_WHITE, CLR_WHITE, CLR_WHITE <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">KeyNo</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, aClr1, aClr2 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />END<br />&nbsp;</div>[/code:v3wozy8t] 2) We know bClrStd returns a color pair { nClrText, nClrBack } If instead of returning a single color as nClrText, if we return an array of colors, those colors are used in the place of aClrText. This example code also works like the above sample: [code=fw:v3wozy8t]<div class="fw" id="{CB}" style="font-family: monospace;">WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">KeyNo</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, <span style="color: #000000;">&#123;</span> aClr1, CLR_WHITE <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> aClr2, CLR_WHITE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />END<br />&nbsp;</div>[/code:v3wozy8t]
Color of text in a selector column
Hi, How can I change the color of text in the xBrowse record selector column
Color of text in a selector column
Una idea [code=fw:1o8khka2]<div class="fw" id="{CB}" style="font-family: monospace;"><br />  oBrwMs:<span style="color: #000000;">nColorPen</span>       := CLR_HGRAY<br />  oBrwMs:<span style="color: #000000;">nColorBox</span>       := CLR_WHITE<br /> </div>[/code:1o8khka2]
Color of text in a selector column
And here nColorPen and nColorBox ? <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
Color of the folder-pages in 9.01
The colors of the folder-pages are now the same as the parent dialog using. But only, if the transparent-clause from the dialog is .T. Is this normal?
Color of the folder-pages in 9.01
Günther, Have you tested it with previous FWH versions ? Was it different ?
Color of the folder-pages in 9.01
Its only from 9.01 on!! In VISTA the background color from the folder dialogs was white, in XP it was a very very light brown as Windows-Standard. Now it is always the color from the parent dialog, when i use TRANSPARENT-clause in DIALOG. But I can set the colors with ...ON INIT oDlg:aDialogs[1...x]:setcolor(....).
Color of the oTree
Hi, Can I change the color and font of the oTree object in xBbrowse ?
Color of the oTree
You can use codeblocks for colors and fonts based on oBrw:oTreeItem:nLevel or any other datas of oBrw:oTreeItem
Color of the oTree
Thanks. Please give a small example
Color of the oTree
[code=fw:mpq2lap9]<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: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">nLevel</span> == <span style="color: #000000;">1</span>, <span style="color: #000000;">&#123;</span> ... <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> ... <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />oBrw:<span style="color: #000000;">oDataFonts</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">nLevel</span> == <span style="color: #000000;">1</span>, oBold, oNormal <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:mpq2lap9]
Color of the oTree
Works. Thanks. I color the row for ::otree:nlevel=1, but it would be more convenient to combine columns in this row. I tried using column merging from the XBRUSER.PRG example Everything works, but the column separators are visible <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: -->
Color of un-redefined Say Objects
Is it possible to apply the same color of the dialog to an un-redefined object In example I have a dialog with a lot OF SAY and GET objects In the source code I have only GET objects Customer ask to me to change color to the dialog REDEFINE DIALOG oDlg RESOURCE "dialogo" COLOR clr_blue, clr_red The say objects remain of original color they do not inherit dialog color. Is it possible to obtain that without a lot of REDEFINE SAY oSay1 ID 401 OF oDlg COLOR clr_blue, clr_red? Many Thanks Marco
Color of un-redefined Say Objects
Marco, Just add the TRANSPARENT clause when defining the dialog: DEFINE DIALOG oDlg RESOURCE "dialogo" COLOR clr_blue, clr_red TRANSPARENT
Color of un-redefined Say Objects
Thanks Antonio
Color of un-redefined Say Objects
Antonio, with TRANSPARENT clause in dialog I have now a little problem. DEFINE DIALOG oDlg RESOURCE "lis_de" FONT oFnt2 COLOR CLR_RED , nColore TRANSPARENT If the dbf vieved by twbrowse object contains a few records the bottom of the dialog is of the same color of dialog itself. Is it possible to force oBrw object as not transparent? I've tried with oBrw:lTransparent without success Thanks in advance marco
Color of un-redefined Say Objects
Marco, Try to set it from the ON INIT clause of the dialog: ACTIVATE DIALOG oDlg ON INIT ( oBrw:lTransparent := .F., oBrw:Refresh() )
Color of un-redefined Say Objects
Antonio, i does not work. I will try it in another little sample program. Best regards marco
Color of un-redefined Say Objects
Antonio, This little sample code makes you understand the problem. If you substitute the line code oBrw := TMyWBrowse():Redefine( 101 , , oDlg ) with oBrw := TWBrowse():Redefine( 101 , , oDlg ) it works but I need TMyWbrowse class Many thanks marco [code=fw:30wtahuf]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oDlg<br /><span style="color: #00C800;">LOCAL</span> oBrw<br /><br /><br />SET DELETED <span style="color: #0000ff;">ON</span><br />SET EXCLUSIVE OFF<br /><br />USE customer<br /><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> field->first TAG first <span style="color: #0000ff;">TO</span> mycust <span style="color: #00C800;">FOR</span> RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> < <span style="color: #000000;">5</span><br /><br /><br /><span style="color: #00C800;">PRIVATE</span> aRec := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">PRIVATE</span> nCur := <span style="color: #000000;">1</span><br /><br />GO TOP<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DIALOG_1"</span> <span style="color: #0000ff;">COLOR</span> CLR_RED, CLR_BLUE TRANSPARENT<br /><br />   oBrw := TMyWBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Redefine</span><span style="color: #000000;">&#40;</span>   <span style="color: #000000;">101</span>   , , oDlg <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//   oBrw := TWBrowse():Redefine(   101   , , oDlg )</span><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">CLASS</span> TMyWBrowse <span style="color: #0000ff;">FROM</span> TWBrowse<br /><br /><span style="color: #B900B9;">//      METHOD Paint()</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//  METHOD Paint() CLASS TMyWBrowse</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//      Super:Paint()</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//      RETURN 0</span><br /> </div>[/code:30wtahuf] [code=fw:30wtahuf]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/****************************************************************************<br /><br /><br />testa.rc<br /><br />produced by Borland Resource Workshop<br /><br /><br />*****************************************************************************/</span><br /><br /><br />DIALOG_1 <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">22</span>, <span style="color: #000000;">32</span>, <span style="color: #000000;">390</span>, <span style="color: #000000;">325</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"TestTransparent"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br />LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL<br /><span style="color: #000000;">&#123;</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"TMyWBrowse"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">356</span>, <span style="color: #000000;">292</span><br /><span style="color: #000000;">&#125;</span><br /><br /> </div>[/code:30wtahuf]
Color of un-redefined Say Objects
up!
Color of un-redefined Say Objects
Please, someone can test this program please? Thanks in advance marco
Color of un-redefined Say Objects
I already tested it but not found a solution, sorry. EMG
Color of un-redefined Say Objects
EMG, Thank you very much!
Color of un-redefined Say Objects
In your opinion is it a bug or is a normal behaviour?
Color of un-redefined Say Objects
I really don't know... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Color of un-redefined Say Objects
Hello your sample work to me [img:1sa5y76y]http&#58;//www&#46;danielgarciagil&#46;com/fivewin/screen/brwtrans&#46;png[/img:1sa5y76y] [url:1sa5y76y]http&#58;//www&#46;danielgarciagil&#46;com/fivewin/samples/dlgtrn&#46;zip[/url:1sa5y76y] [code=fw:1sa5y76y]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oDlg<br /><span style="color: #00C800;">LOCAL</span> oBrw<br /><br /><br />SET DELETED <span style="color: #0000ff;">ON</span><br />SET EXCLUSIVE OFF<br /><br />USE customer<br /><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> field->first TAG first <span style="color: #0000ff;">TO</span> mycust <span style="color: #00C800;">FOR</span> RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> < <span style="color: #000000;">5</span><br /><br /><br /><span style="color: #00C800;">PRIVATE</span> aRec := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">PRIVATE</span> nCur := <span style="color: #000000;">1</span><br /><br />GO TOP<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DIALOG_1"</span> <span style="color: #0000ff;">COLOR</span> CLR_RED, CLR_BLUE TRANSPARENT<br /><br /><span style="color: #B900B9;">//   oBrw := TMyWBrowse():Redefine(   101   , , oDlg )</span><br />   oBrw := TWBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Redefine</span><span style="color: #000000;">&#40;</span>   <span style="color: #000000;">101</span>   , , oDlg <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">CLASS</span> TMyWBrowse <span style="color: #0000ff;">FROM</span> TWBrowse<br /><br /><span style="color: #B900B9;">//      METHOD Paint()</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//  METHOD Paint() CLASS TMyWBrowse</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//      Super:Paint()</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//      RETURN 0</span><br /> <br /> </div>[/code:1sa5y76y] [code=fw:1sa5y76y]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">/****************************************************************************<br /><br /><br />testa.rc<br /><br />produced by Borland Resource Workshop<br /><br /><br />*****************************************************************************/</span><br /><br /><br />DIALOG_1 <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">22</span>, <span style="color: #000000;">32</span>, <span style="color: #000000;">390</span>, <span style="color: #000000;">325</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"TestTransparent"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br />LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL<br /><span style="color: #000000;">&#123;</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"TWBrowse"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">356</span>, <span style="color: #000000;">292</span><br /><span style="color: #000000;">&#125;</span><br /><br /> <br /> </div>[/code:1sa5y76y]
Color of un-redefined Say Objects
You have to comment TWBrowse and uncomment TMyWBrowse in order to see the problem. EMG
Color of un-redefined Say Objects
[quote="MarcoBoschi":2a6youpf]In your opinion is it a bug or is a normal behaviour?[/quote:2a6youpf] Not a bug at all. There are two alternative ways: Alternative-1: [code=fw:2a6youpf]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> CLR_BLACK, CLR_WHITE <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>[/code:2a6youpf] You may also add oBrw:lTransparent := .f. also in the INIT clause. Alternative-2: Please add this inline method to your derived class TMyWBrowse: [code=fw:2a6youpf]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lTransparent</span> := .f., <span style="color: #00C800;">Super</span>:<span style="color: #000000;">Initiate</span><span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:2a6youpf] In this case, you do not have to do anything in the INIT clause of the dialog.
Color of un-redefined Say Objects
Great Now it works! King regards Marco
Color on Report
I have this xbrowse [img:2lhwcrcp]https&#58;//i&#46;postimg&#46;cc/rppc6Rjn/gg&#46;png[/img:2lhwcrcp] I wish make a report and print also the color column, so how I can make ?
Color on Report
Resolved !!!!!! (thank Nages) .....making a temporaney bitmap with the colors [img:3q89xisp]https&#58;//i&#46;postimg&#46;cc/GmPMrMtz/yes&#46;png[/img:3q89xisp]
Color on Report
Good morning Silvio. Whenever possible, post the example of the solution, so that other users can enjoy the solution of the problem. If it is not possible, there is no problem. The intention is always to help newbies who are starting in this wonderful universe of fivewin. This report was very beautiful. Congratulations. Thanks. Greetings.
Color on Report
[quote="karinha":15jxig5h]Good morning Silvio. Whenever possible, post the example of the solution, so that other users can enjoy the solution of the problem. If it is not possible, there is no problem. The intention is always to help newbies who are starting in this wonderful universe of fivewin. This report was very beautiful. Congratulations. Thanks. Greetings.[/quote:15jxig5h] I found the solution on this forum from[b:15jxig5h] a Nages sample[/b:15jxig5h] to create bitmap from two colors with [b:15jxig5h] FW_MakeYourBitmap[/b:15jxig5h] function
Color on Report
ok, thanks. [url:1607cwdj]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=35518&p=211553&hilit=FW_MakeYourBitmap#p211553[/url:1607cwdj] [url:1607cwdj]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=36838&p=219763&hilit=FW_MakeYourBitmap#p219763[/url:1607cwdj] Regards.
Color on tab\folder
To AllWith the standard FWH folder class ... I have multiple folders with tabs and I would like to be able to turn the tab prompt a specific color based on certain data conditions..Rick Lipkin
Color on tab\folder
It is not possible with the present FWH folder class, because it uses standard windows folders. For 16-bit clipper the folder.prg uses folders drawn by fivewin itself.
Color on tab\folder
Hi Rick,See this: [url:1i5di0s6]http&#58;//www&#46;fivewin&#46;com&#46;br/forum/topic&#46;asp?whichpage=1&ARCHIVE=&TOPIC_ID=13108[/url:1i5di0s6]This is the direct link to the download:[url:1i5di0s6]http&#58;//www&#46;vrmm&#46;com&#46;br/downloads/folder&#46;zip[/url:1i5di0s6]Regards,Rossine.
Color on tab\folder
RossineI have download the rfolder class and have an example .. I see no examples using a resource. Looking at the rfolder.ch .. it appears RESOURCE is supported ..Getting a can not create dialog error .. here is the snipit of rfolder code causing the problem and my code with the relevant portion of the error log. Any advice here would be welcome.Rick Lipkin// from rfolder.prg DEFINE DIALOG oDlg2 Title "" OF Self; FROM 0, 0 TO ::aHSay[1]*::nLinhas, ::nWidth PIXEL ; FONT Self:oFont Color ::nClrFore2, ::nClrBack2 STYLE ::nStyle oDlg2:bLClicked := {|nCol, nRow| ::ClickArea( nCol, nRow ) } ACTIVATE DIALOG oDlg2 NoWait has to do with TITLE .. Here is my code : DEFINE DIALOG oGOAL RESOURCE "STGOALS" ; COLOR rgb(192,192,192), rgb(172,163,157) ; TITLE cTITLE //------ set up all tabs REDEFINE RFOLDER oFLD1 ID 110 of oGOAL ; PROMPT "Goal1 ab", "Goal1 cde","Goal2 ab", "Goal2 cd", "Goal 2e", "Goal3", "Goal4 ab", "Goal4 cd", "Goal5 ab", "Goal5 cde", "None" ; DIALOGS "STG1", "STG1E", "STG2", "STG2D" , "STG2E", "STG3", "STG4", "STG4D", "STG5","STG5E", "STG6" ; COLOR CLR_BLACK, nRGB( 225, 231,220 ) // error log Application=========== Path and name: C:\FOX\PMOSQL\PmoW32.Exe (32 bits) Size: 1,995,776 bytes Time from start: 0 hours 0 mins 9 secs Error occurred at: 07/30/2008, 11:37:32 Error description: Error FiveWin/3 Cannot create Dialog Box: Title: Stack Calls=========== Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(0) Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(0) Called from: rfolder.prg => TRFOLDER:INICIAR(1296) Called from: rfolder.prg => TRFOLDER:REDEFINE(450) Called from: STGOALS.PRG => _STGOALS(335) Called from: PROJVIEW.PRG => (b)_PROJVIEW(464) Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK(0) Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP(0) Called from: => TWINDOW:HANDLEEVENT(0) Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(0) Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT(0) Called from: .\source\classes\WINDOW.PRG => _FWH(0) Called from: => DIALOGBOX(0) Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(0) Called from: PROJVIEW.PRG => _PROJVIEW(524) Called from: PROJBROW.PRG => (b)PROJMENU(313) Called from: .\source\classes\MENU.PRG => TMENU:COMMAND(0) Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND(0) Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND(0) Called from: => TMDIFRAME:HANDLEEVENT(0) Called from: .\source\classes\WINDOW.PRG => _FWH(0) Called from: => WINRUN(0) Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(0) Called from: MAIN.PRG => MAIN(311)
Color on tab\folder
Hello Rick,The AUTHOR of this class Ricardo marques says:[quote:1ont9gr3] [SET PORTUGUESE] Ainda não consegui coloca-la em recursos. Como já havia dito anteriormente, por não trabalhar com recursos, teria sim uma certa dificudade pra implementar isso. Ainda não entendo, como é que o sistema busca algumas informações, como coordenadas, sizes, etc. Sei que elas estão declaradas no arquivo de recursos, mas ainda não sei como acessar esses dados. Se tiver alguma dica, ajudaria muito. [/quote:1ont9gr3]See more here:[url:1ont9gr3]http&#58;//www&#46;fivewin&#46;com&#46;br/forum/topic&#46;asp?TOPIC_ID=13108&whichpage=4&ARCHIVE=[/url:1ont9gr3]Sorry, <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Rossine.
Color on tab\folder
[quote="Rossine":1o1wbtrv]Hello Rick, The AUTHOR of this class Ricardo marques says: [quote:1o1wbtrv] [SET PORTUGUESE] Ainda não consegui coloca-la em recursos. Como já havia dito anteriormente, por não trabalhar com recursos, teria sim uma certa dificudade pra implementar isso. Ainda não entendo, como é que o sistema busca algumas informações, como coordenadas, sizes, etc. Sei que elas estão declaradas no arquivo de recursos, mas ainda não sei como acessar esses dados. Se tiver alguma dica, ajudaria muito. [/quote:1o1wbtrv] See more here:[url:1o1wbtrv]http&#58;//www&#46;fivewin&#46;com&#46;br/forum/topic&#46;asp?TOPIC_ID=13108&whichpage=4&ARCHIVE=[/url:1o1wbtrv] Sorry, <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Rossine.[/quote:1o1wbtrv]Bummer .. here is the translation :Still did not I obtain puts-her in resources. As already it to have said previously, by do not work with resources, would have yes a certain one dificudade for the implement that. Still not entendo, as is that the system seeks some information, like coordinates, sizes, etc. I know that they are declared in the file of resources, but still do not I know as access those facts. If will have some hint, would help very. Seems the root problem is from resource ?? RIck
Color on tab\folder
Rick,[quote:1xxp4cfe] Seems the root problem is from resource ?? [/quote:1xxp4cfe] Yes. Ricardo says: [quote:1xxp4cfe] If will have some hint, would help very [/quote:1xxp4cfe]The author does not know as implement the changes for resources. Come in in contact with him, perhaps he already have some advancement about this ok? Email: <!-- e --><a href="mailto:ricardomouramarques@hotmail.com">ricardomouramarques@hotmail.com</a><!-- e -->Regards,Rossine.
Color on tab\folder
RossineRicardo and I have exchanged the initial e-mail when I enquired about his class .. however I have sent him two messages ( since ) asking for some help on this particular situation and I have not heard a word <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Rick Lipkin
Color palette
Hello guys... I am looking for a solution to create a color palette for the user to select. Has anyone done? [img:12n3vs9f]https&#58;//comunidadeweb&#46;com&#46;br/wp-content/uploads/2016/07/tabeladecorescoreldraw&#46;png[/img:12n3vs9f] Thanks
Color palette
Christiano, I think You want to select a color from a defined colorselection <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> Just define a array with the colorvalues. You can create Your own color palette (colorpicker) with xBrowse like : This sample shows a array with the basiccolors. [img:3ax7aful]http&#58;//www&#46;service-fivewin&#46;de/IMAGES/colorpick7&#46;jpg[/img:3ax7aful] [code=fw:3ax7aful]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> RGB_BASIC<span style="color: #000000;">&#40;</span> oDlgMain <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oBrw2, n<br /><span style="color: #B900B9;">// array of cellcolors for colorselection</span><br /><span style="color: #00C800;">LOCAL</span> aDat1 := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, ;<br />                              nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,; <br />                            <span style="color: #000000;">&#123;</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">64</span> <span style="color: #000000;">&#41;</span>, ;<br />                               nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;                 <br />                            <span style="color: #000000;">&#123;</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">64</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, ;<br />                              nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">64</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;         <br />                            <span style="color: #000000;">&#123;</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">64</span> <span style="color: #000000;">&#41;</span>, ;<br />                              nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">160</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;         <br />                            <span style="color: #000000;">&#123;</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">64</span> <span style="color: #000000;">&#41;</span>, ;<br />                              nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">64</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">64</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;         <br />                            <span style="color: #000000;">&#123;</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">64</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, ;<br />                              nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">64</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">120</span> <span style="color: #0000ff;">OF</span> oDlgMain ARRAY aDat1 ;<br />FIELDS aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>, ;<br />              aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>, aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>, aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span>, ;<br />              aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#93;</span>, aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">8</span> <span style="color: #000000;">&#93;</span> ;<br />LINES COLSIZES <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span><br /><br />WITH OBJECT oBrw2<br />    :<span style="color: #000000;">lRecordSelector</span>        := .F. <span style="color: #B900B9;">// .t.</span><br />    :<span style="color: #000000;">lColDividerComplete</span>    := .T. <span style="color: #B900B9;">// .f.</span><br />    :<span style="color: #000000;">lAllowColSwapping</span>      := .F.<br />    :<span style="color: #000000;">lAllowColHiding</span>        := .F.<br />    :<span style="color: #000000;">lFastEdit</span>              := .F.<br />    :<span style="color: #000000;">lHeader</span>                := .F.<br />    :<span style="color: #000000;">nStretchCol</span>            := <span style="color: #000000;">-1</span><br />    :<span style="color: #000000;">lRecordSelector</span>        := .F.<br />    :<span style="color: #000000;">lAllowRowSizing</span>        := .F.<br />    :<span style="color: #000000;">lHScroll</span>               := .F.<br />    :<span style="color: #000000;">lVScroll</span>               := .F.<br />    :<span style="color: #000000;">lDrawBorder</span>            := .T.<br />    :<span style="color: #000000;">nMarqueeStyle</span>      := <span style="color: #000000;">1</span><br />    :<span style="color: #000000;">nRowHeight</span>         := <span style="color: #000000;">30</span><br /><br />    :<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;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> , aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />    :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> , aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />    :<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>|| <span style="color: #000000;">&#123;</span> , aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />    :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> , aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />    :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> , aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />    :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> , aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />    :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> , aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />    :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> , aDat1<span style="color: #000000;">&#91;</span> oBrw2:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />END<br /><br /><span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> LEN<span style="color: #000000;">&#40;</span> oBrw2:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span><br />      oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bPaintText</span> = <span style="color: #000000;">&#123;</span> | oCol, hDC, cText | <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#125;</span><br />      oBrw2:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lAllowSizing</span> := .F.<br /><span style="color: #00C800;">NEXT</span><br /><br />oBrw2:<span style="color: #000000;">bLClicked</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol | <span style="color: #000000;">&#40;</span> nRPos := oBrw2:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />                                                        nCPos := oBrw2:<span style="color: #000000;">SelectedCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nCreationOrder</span>, ;<br />                            COLORVALUE<span style="color: #000000;">&#40;</span> aDat1<span style="color: #000000;">&#91;</span>nRPos<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>nCPos<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />oBrw2:<span style="color: #000000;">bChange</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol | <span style="color: #000000;">&#40;</span>  nRPos := oBrw2:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />                                                        nCPos := oBrw2:<span style="color: #000000;">SelectedCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nCreationOrder</span>, ;<br />                            COLORVALUE<span style="color: #000000;">&#40;</span> aDat1<span style="color: #000000;">&#91;</span>nRPos<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>nCPos<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// -------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> COLORVALUE<span style="color: #000000;">&#40;</span> nColor <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> nRed := nRGBRed<span style="color: #000000;">&#40;</span> nColor <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> nGreen := nRGBGreen<span style="color: #000000;">&#40;</span> nColor <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> nBlue := nRGBBlue<span style="color: #000000;">&#40;</span> nColor <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCal</span> cWordRGB := <span style="color: #ff0000;">"nRGB( "</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>nRed<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">", "</span> + ;<br />                                     ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>nGreen<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">", "</span> + ;<br />                                     ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>nBlue<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br /><br /><span style="color: #B900B9;">// save result to ???</span><br />MsgAlert<span style="color: #000000;">&#40;</span> nColor, <span style="color: #ff0000;">"Color NUMERIC"</span><span style="color: #000000;">&#41;</span> <br />MsgAlert<span style="color: #000000;">&#40;</span> cWordRGB, <span style="color: #ff0000;">"Color RGB"</span><span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /> </div>[/code:3ax7aful] best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Color palette
Thank you, perfect!
Color palette
Hello guys. Some adjustments are still missing, but it's perfect! [img:148087se]http&#58;//maxxtech&#46;com&#46;br/forum/gac-window&#46;jpg[/img:148087se]
Color palette
May I know why can't we use Microsoft Windows color picker? This is a standard Windows interface and all Windows users are familiar with its use and functionality. This is available in fwh function ChooseColor( nClr ) ---> nClr
Color palette
Hello Nages. I didn't know this function, but I would only use it if there was no option since it is out of the standard of my screens. Hugs
Color palette
I*m building the needed array for this selection <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> [quote:2f6m6f0h]I didn't know this function, but I would only use it if there was no option since it is out of the standard of my screens.[/quote:2f6m6f0h] [img:2f6m6f0h]http&#58;//www&#46;service-fivewin&#46;de/IMAGES/colors1&#46;jpg[/img:2f6m6f0h] a defined column-array looks like [code=fw:2f6m6f0h]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Row     Column <span style="color: #000000;">1</span> <span style="color: #000000;">&#40;</span> red <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #000000;">1</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">51</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">2</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">102</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">3</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">153</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">4</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">204</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">5</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">6</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">51</span>, <span style="color: #000000;">51</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">7</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">102</span>, <span style="color: #000000;">102</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">8</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">153</span>, <span style="color: #000000;">153</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">9</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">204</span> <span style="color: #000000;">&#41;</span><br /><br />Row     Column <span style="color: #000000;">2</span> <span style="color: #000000;">&#40;</span> brown <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #000000;">1</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">51</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">2</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">102</span>, <span style="color: #000000;">51</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">3</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">153</span>, <span style="color: #000000;">76</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">4</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">204</span>, <span style="color: #000000;">102</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">5</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">6</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">153</span>, <span style="color: #000000;">51</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">7</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">178</span>, <span style="color: #000000;">102</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">8</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">153</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">9</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">229</span>, <span style="color: #000000;">204</span> <span style="color: #000000;">&#41;</span><br /><br />Row     Column <span style="color: #000000;">3</span> <span style="color: #000000;">&#40;</span> yellow <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #000000;">1</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">51</span>, <span style="color: #000000;">51</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">2</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">102</span>, <span style="color: #000000;">102</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">3</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">153</span>, <span style="color: #000000;">153</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">4</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">204</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">5</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">6</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">51</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">7</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">102</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">8</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">153</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">9</span>       nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">204</span> <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:2f6m6f0h] like You can see with this function ChooseColor( nClr ) the colors are not splitted to the same brightness-level I think that is the solution You are looking for <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> [img:2f6m6f0h]http&#58;//www&#46;service-fivewin&#46;de/IMAGES/colors2&#46;jpg[/img:2f6m6f0h] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Color palette
This is Windows API ChooseColor() made available by FWH through its function ChooseColor(). One can make his own function, but can not easily match its functionality.
Color para línea de browse con foco
Hola. ¿Puede alguien indicarme cómo establecer el color para la línea del browse que tiene el foco? He probado con oBrw:bClrSelFocus pero no funciona. Gracias por adelantado.
Color para línea de browse con foco
bClrStd for all lines and cells, when in focus and out of focus. bClrSelFocus : for Selected Cell when the browse is in focus bClrSel for Selected Cell when browse is not in focus
Color para línea de browse con foco
Fernando; Solo por si sos usuario nuevo de xbrowse Tene en cuenta que xBrowse permite mostrar distintos tipos de "barras" de señalización o celda de señalización. Y esto se define con :nMarqueeStyle:= ... (valores en xbrowse.ch) Y de ahí los colores que se pueden usar pararesaltar "barra" o "celda". Quizás tambien encuentres interesante esto: [url:mvs2sgat]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=27051&sid=c7426821ce419a4a875b0ec06715509a#p150243[/url:mvs2sgat]
Color printing
Using the tPrinter class, is there a way to print a column with a specific color ? I have a report that attaches to an Invoice. It is a checklist. The first column should be green, the second yellow, the third red, and the last ( and biggest ) is no color and contains the description. The first 3 columns will have printing but just a few characters each.
Color printing
Yes Please use nClrText parameter in the Print (say) methods of Printer class. Please refer to printer.prg
Color printing
I had looked at that. What I want is to have the column background color to be set. With an xBrowse, we get this effect by using this: [code=fw:o4yufhh8]<div class="fw" id="{CB}" style="font-family: monospace;"><br />        oLbx8:<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;">SetCheck</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        oLbx8:<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;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">65280</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>         <span style="color: #B900B9;">// Green</span><br />        oLbx8:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        oLbx8:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>,  <span style="color: #000000;">65535</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>    <span style="color: #B900B9;">// Yellow</span><br />        oLbx8:<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;">SetCheck</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        oLbx8:<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>|| <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>,  <span style="color: #000000;">255</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>        <span style="color: #B900B9;">// Red</span><br />        oLbx8:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:o4yufhh8] Now I want to have the same result when I do a printout, where the first 3 COLUMNS can have the background color set to green, yellow, and red. I also noticed that I can use the SAYTEXT( ) method so I tried this: [code=fw:o4yufhh8]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> oPrintInspect:<span style="color: #000000;">svcpas</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPrn:<span style="color: #000000;">SayText</span><span style="color: #000000;">&#40;</span> nRow, <span style="color: #000000;">2</span>*nCsp, <span style="color: #ff0000;">"PASS"</span>,,, oFbold, , CLR_BLACK, &nbsp;CLR_GREEN &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEIF oPrintInspect:<span style="color: #000000;">svcwat</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPrn:<span style="color: #000000;">SayText</span><span style="color: #000000;">&#40;</span> nRow, <span style="color: #000000;">2</span>*nCsp, <span style="color: #ff0000;">"Watch"</span>,,, oFbold , , CLR_BLACK, CLR_YELLOW &nbsp;<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEIF oPrintInspect:<span style="color: #000000;">svcfal</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> nRow, <span style="color: #000000;">2</span>*nCsp, <span style="color: #ff0000;">"FAIL"</span>,,, oFbold , , CLR_BLACK, CLR_RED <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span> &nbsp;<br />&nbsp;</div>[/code:o4yufhh8] It prints no color. I am using a Brother Color Laser Printer ... but not getting any output to Preview, or to Print, in color ... just black and white
Color printing
Hello Tim, try Fivewin’s EasyReport. Best regards Otto [img:2r23g0g9]https&#58;//mybergland&#46;com/FWForum/fontcolor2&#46;jpg[/img:2r23g0g9]
Color printing
Hello Tim now with your green and red . Best regards Otto [img:3ja5x26q]https&#58;//mybergland&#46;com/FWForum/fontcolor3&#46;jpg[/img:3ja5x26q] [img:3ja5x26q]https&#58;//mybergland&#46;com/FWForum/fontcolor4&#46;jpg[/img:3ja5x26q]
Color printing
Otto, I want to try EasyReport but I don't think I have a working build yet. HOWEVER, in this case I am creating an invoice that includes a variety of data to be presented. It is certainly not simple, and it has decisions to make as it is processed. I wrote it using tPrinter and it works quite well. I would like to work with EasyReport but I need to have a stable copy. It is my understanding that it was never finished ( thought Antonio told me in 12/2017 that was a priority for 2018 ). I believe it should be in our FWH distributions and useable as a report generator that we can build into our application. I think that was the original goal, so I can give my clients a tool to build custom reports. Tim
Color printing
Hello Tim, vrd.prg is renamed as esreport.prg and included in fwh\functions. The function and class names are changed. easyrep.ch translates the same commands to esreport.prg function names. No need to link vrd.prg. Can you please post a screen of your bill. EasyReport is in FWH distributions and useable as a report generator. You can build EasyReport into our application. Please start with some reports. Best regards Otto
Color printing
Otto, Can I have an email address to send you a copy ? Tim
Color printing
Using printer object directly: FWH15.10 introduced enhanced methods for printing text and images. [code=fw:39yocbjs]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> SayText<span style="color: #000000;">&#40;</span> nRow, nCol, cText, nWidth, nHeight, oFont, cAlign, nClrText, nClrBack <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">METHOD</span> PrintImage<span style="color: #000000;">&#40;</span> nRow, nCol, uImage, nWidth, nHeight, lStretch, nAlpha, lTransp, lGray <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:39yocbjs] Command syntax is provided for ease of use (see print.ch). We recommend use of command syntax. Example: [code=fw:39yocbjs]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oPrn, oFont<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBrushGreen, oBrushRed, oBrushYellow<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow, nRowSize<br /><br />&nbsp; &nbsp;USE CUSTOMER <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUST<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">PRINT</span> oPrn PREVIEW<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span> <span style="color: #0000ff;">OF</span> oPrn<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrushGreen &nbsp;<span style="color: #0000ff;">COLOR</span> CLR_HGREEN<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrushRed &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> CLR_RED<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrushYellow <span style="color: #0000ff;">COLOR</span> CLR_YELLOW<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">PAGE</span><br /><br />&nbsp; &nbsp; &nbsp; nRow &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">1.0</span> &nbsp; <span style="color: #B900B9;">// inch</span><br />&nbsp; &nbsp; &nbsp; nRowSize &nbsp; &nbsp;:= <span style="color: #000000;">0.3</span> &nbsp; <span style="color: #B900B9;">// inch</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> < <span style="color: #000000;">11</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ nRow, <span style="color: #000000;">1.0</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">TEXT</span> CUST->FIRST <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1.45</span>,nRowSize INCHES <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> CLR_BLACK, oBrushGreen<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ nRow, <span style="color: #000000;">2.5</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">TEXT</span> CUST->CITY &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1.45</span>,nRowSize INCHES <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> CLR_WHITE, oBrushRed<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ nRow, <span style="color: #000000;">4.0</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">TEXT</span> CUST->ZIP &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1.25</span>,nRowSize INCHES <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> CLR_HBLUE, oBrushYellow<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ nRow, <span style="color: #000000;">5.3</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">IMAGE</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> CUST->MARRIED, FWBmpOn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, FWBmpOff<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0.50</span>,nRowSize INCHES<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRow &nbsp;+= nRowSize<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SKIP<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDPAGE</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDPRINT</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">BRUSH</span> oBrushGreen, oBrushRed, oBrushYellow<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:39yocbjs] Result: [url=https&#58;//imageshack&#46;com/i/pnzcYKS4p:39yocbjs][img:39yocbjs]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/923/zcYKS4&#46;png[/img:39yocbjs][/url:39yocbjs]
Color printing
Thank you. Since all of my code is using the class rather than the command, I was getting an error trying to inject a COMMAND line. However, I translated to the SAYTEXT( ) successfully. I would still suggest you look at SAY( ) and SAYTEXT( ) in printer.prg. As I noted before, if you set a color with either one for a single line ( or section ) it remains in force for all further calls to the SAY. It becomes the default until changed. Sometimes we want to simply put a highlight on a word or phrase in a different color. This requires extra code on each call to SAY( ) or SAYTEXT( ). You could modify the method to save the current color value(s), then specify the new ones for the print line specified, and then return to the original colors before exiting the method(s). I think this would be helpful. I can do it on my copy of printer.prg, and link that in, but then I have to make the change on every new version we receive.
Color printing
[quote:34k2cu9f] I would still suggest you look at SAY( ) and SAYTEXT( ) in printer.prg. As I noted before, if you set a color with either one for a single line ( or section ) it remains in force for all further calls to the SAY. It becomes the default until changed. Sometimes we want to simply put a highlight on a word or phrase in a different color. This requires extra code on each call to SAY( ) or SAYTEXT( ). [/quote:34k2cu9f] This is the behaviour of the METHOD Say() but NOT the METHOD SayText(). Seems you made the comment without actually testing SayText(). This behaviour of :Say() has been in existence since beginning and there could be a lot of working software using this behaviour. Any change might affect the existing software. [quote:34k2cu9f] Since all of my code is using the class rather than the command, I was getting an error trying to inject a COMMAND line. However, I translated to the SAYTEXT( ) successfully. [/quote:34k2cu9f] Usage of command syntax should not give any errors. Proof is the posting above. In addition I have been using it in many software projects without any problem. However whether to use command syntax or method directly is a matter of programmers' choice.
Color printing
[quote:30a2k6ik]This is the behaviour of the METHOD Say() but NOT the METHOD SayText(). Seems you made the comment without actually testing SayText().[/quote:30a2k6ik] Seems that's a rather unfair assumption since I DID adopt the SayText() method as YOU suggested ... and that is how it is performing ... [code=fw:30a2k6ik]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Prints FAIL as white on red </span><br />&nbsp; &nbsp; &nbsp; oPrn:<span style="color: #000000;">SayText</span><span style="color: #000000;">&#40;</span> nRow, <span style="color: #000000;">2</span> * nCsp, <span style="color: #ff0000;">"FAIL"</span>,<span style="color: #000000;">6</span>*nCsp,nRsp, oFbold, , CLR_WHITE, oBrushRed <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// Prints text in White on Red</span><br />&nbsp; &nbsp; &nbsp;oPrn:<span style="color: #000000;">SayText</span><span style="color: #000000;">&#40;</span> nRow, <span style="color: #000000;">10</span> * nCsp, MemoLine<span style="color: #000000;">&#40;</span> oPrintInspect:<span style="color: #000000;">svcdes</span>, <span style="color: #000000;">60</span>, lx,, .T. <span style="color: #000000;">&#41;</span>,,, oFnorm <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// Required to return text to default of black on white</span><br />&nbsp; &nbsp; &nbsp;oPrn:<span style="color: #000000;">SayText</span><span style="color: #000000;">&#40;</span> nRow, <span style="color: #000000;">10</span> * nCsp, MemoLine<span style="color: #000000;">&#40;</span> oPrintInspect:<span style="color: #000000;">svcdes</span>, <span style="color: #000000;">60</span>, lx,, .T. <span style="color: #000000;">&#41;</span>,,, oFnorm, , CLR_BLACK, oBrushWhite <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:30a2k6ik]
Color shemes.
Guys: Is there a sample program that returns / displays the color combination that the user selects ? For example how do I implement the following: "W+/B" ? Thank you.
Color shemes.
Gustavo, can You explain in detail, what You want to do ? Selecting a pair Background- / Textcolor and changing it at runtime for a defined / selected control ? Window, Dialog, Folder or ??? Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
Color shemes.
Gustavo, MsgInfo( ChooseColor() )
Color shemes.
Antonio, Uwe: Thank you very much.
Color texto TXBrowse (Solucionado)
Hola buenas tardes, de antemano, les envio cordial saludos. Mis estimados, cuel es el metodo para [b:1syq9g2r]colorear texto en TXBrowse[/b:1syq9g2r], alguien me pudiera proporcionar algun ejemplo ,ya que en otros metodos, me pinta toda la celda o solo una celda, pero solo quiero colorear en color color rojo el texto, ya sea letra o numerico, en mi caso numerico, para identificar si es importe negativo que me coloree el texto en rojo [color=#BF0000:1syq9g2r]-5,940.00[/color:1syq9g2r]. Les agradecere mucho si alguien me pudiera proporcionar algun ejemplo. Saludos y buen dia.! Atte: Adrian C. C.
Color texto TXBrowse (Solucionado)
Puedes probar algo asi [code=fw:wkkip4fu]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">oCol7</span>:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> aDatos<span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span><<span style="color: #000000;">0</span>, <span style="color: #000000;">&#123;</span>CLR_RED,<span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span>CLR_BLACK,<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:wkkip4fu]
Color texto TXBrowse (Solucionado)
[quote="cnavarro":q80dfq56]Puedes probar algo asi [code=fw:q80dfq56]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">oCol7</span>:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> aDatos<span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span><<span style="color: #000000;">0</span>, <span style="color: #000000;">&#123;</span>CLR_RED,<span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span>CLR_BLACK,<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /> </div>[/code:q80dfq56][/quote:q80dfq56] Gracias Ing. Cristobal por responder, hare la prueba y le comento, estaba probando con otro metodo, que trabaja en TWBrowse, pero en TXBrowse, no me funciona o no es el metodo adecuado , esta es la instruccion: [code=fw:q80dfq56]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bTextColor</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol, nStyleLine | ColoresTexto<span style="color: #000000;">&#40;</span> nRow, nCol, nStyleLine, oDlg2 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:q80dfq56] Saludos y gracias de nuevo.! Atte: Adrian C. C.
Color texto TXBrowse (Solucionado)
[quote="ACC69":3nccrtfj][quote="cnavarro":3nccrtfj]Puedes probar algo asi [code=fw:3nccrtfj]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">oCol7</span>:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> aDatos<span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span><<span style="color: #000000;">0</span>, <span style="color: #000000;">&#123;</span>CLR_RED,<span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span>CLR_BLACK,<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /> </div>[/code:3nccrtfj][/quote:3nccrtfj] Gracias Ing. Cristobal por responder, hare la prueba y le comento, estaba probando con otro metodo, que trabaja en TWBrowse, pero en TXBrowse, no me funciona o no es el metodo adecuado , esta es la instruccion: [code=fw:3nccrtfj]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bTextColor</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol, nStyleLine | ColoresTexto<span style="color: #000000;">&#40;</span> nRow, nCol, nStyleLine, oDlg2 <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:3nccrtfj] Saludos y gracias de nuevo.! Atte: Adrian C. C.[/quote:3nccrtfj] Hola Cristobal, aqui de nuevo con tu ejemplo, no me da el efecto deseado <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> o que estare haciendo mal, que no pinta color rojo en texto, solo me da color negro las celdas . [color=#BF0000:3nccrtfj]5,940.00[/color:3nccrtfj] [code=fw:3nccrtfj]<div class="fw" id="{CB}" style="font-family: monospace;">:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrStd</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>S13<span style="color: #000000;">&#41;</span>->MV_CARG < <span style="color: #000000;">0</span> .OR. <span style="color: #000000;">&#40;</span>S13<span style="color: #000000;">&#41;</span>->MV_ABON < <span style="color: #000000;">0</span>, <span style="color: #000000;">&#123;</span>CLR_RED,<span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span>CLR_BLACK,<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span></div>[/code:3nccrtfj] O alguien mas que me pueda echar la mano, con esta simple sencillo de pintado de colores en texto .. Saludos y buen dia. Atte: Adrian C. C.
Color texto TXBrowse (Solucionado)
Yo lo tengo asi : [code=fw:36xqeli4]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrow:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>|| IIF<span style="color: #000000;">&#40;</span>ARTICULOS->TOT_SALDO_CJA<=<span style="color: #000000;">0</span>,<span style="color: #000000;">&#123;</span>Rgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>,CLR_WHITE<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 /> </div>[/code:36xqeli4]