topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
Colocar Negrilla en mitad del texto | Hola Antonio Gracias por Responder...
Claro que si...te adjunto el codigo
[code=fw:9h1frp19]<div class="fw" id="{CB}" style="font-family: monospace;"><br />********************************<br />*Imprime Contrato de Compraventa<br />********************************<br /><span style="color: #00C800;">FUNCTION</span> pNotificaCobro<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">local</span> text1,text2,nomb<br />uFec:=dtoc<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />uTim:=subs<span style="color: #000000;">(</span>time<span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">8</span><span style="color: #000000;">)</span><br /><br />dia:=day<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />mes:=oLamcla:<span style="color: #000000;">vMese</span><span style="color: #000000;">[</span>month<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">]</span><br />ano:=<span style="color: #0000ff;">year</span><span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />nDia:=Letras<span style="color: #000000;">(</span>dia<span style="color: #000000;">)</span><br /><br />vRGman:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"id_manzana"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br />vRGlot:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"id_lote"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br />vRGter:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"docu_terce"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br />vRGtel:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"telefono"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"C"</span><span style="color: #000000;">)</span><br />vRGdir:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"direccion"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"C"</span><span style="color: #000000;">)</span><br />vRGexp:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"expedida"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"C"</span><span style="color: #000000;">)</span><br />vRGres:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"residencia"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"C"</span><span style="color: #000000;">)</span><br />vRGmts:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"mts2"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br />vRGcbe:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"cedula_benefi"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br />vRGnbe:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"nombre_benefi"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /><br />tVar := <span style="color: #000000;">{</span>|| vArray:=oLamcla:<span style="color: #000000;">pRetornoarra2</span><span style="color: #000000;">(</span><span style="color: #000000;">3</span>,alltrim<span style="color: #000000;">(</span>vRGter<span style="color: #000000;">)</span>,<span style="color: #000000;">30</span><span style="color: #000000;">)</span>,nomb:=vArray<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><span style="color: #000000;">}</span><br />EVAL<span style="color: #000000;">(</span> tVar <span style="color: #000000;">)</span><br />vBar:=<span style="color: #ff0000;">"DIR-"</span>+strzero<span style="color: #000000;">(</span>vRGman,<span style="color: #000000;">3</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">"-"</span>+strzero<span style="color: #000000;">(</span>vRGlot,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><br /><br />nFecha:=<span style="color: #ff0000;">"Yopal, "</span>+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>dia<span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">" de "</span>+alltrim<span style="color: #000000;">(</span>mes<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" de "</span>+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>ano<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />nCedu:=<span style="color: #ff0000;">"C.C.No.: "</span>+alltrim<span style="color: #000000;">(</span>vRGter<span style="color: #000000;">)</span><br />nDire:=<span style="color: #ff0000;">"Direccion: "</span>+alltrim<span style="color: #000000;">(</span>vRGdir<span style="color: #000000;">)</span><br />nTele:=<span style="color: #ff0000;">"Telefono: "</span>+alltrim<span style="color: #000000;">(</span>vRGtel<span style="color: #000000;">)</span><br />nRefe:=<span style="color: #ff0000;">"COMPRAVENTA DE LOTE No. "</span>+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>vRGlot<span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">" Mz. "</span>+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>vRGman<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br />text1:=<span style="color: #ff0000;">"NOMBRE DEL GERENTE, en mi calidad de Representante Legal de la Ciudadela La "</span><br />text1+=<span style="color: #ff0000;">"Ciudadela La Bendición, de manera formal y ante el caso omiso a los llamados de cobro "</span><br />text1+=<span style="color: #ff0000;">"verbales, me permito comunicarle que de acuerdo con el contrato de compraventa verbal "</span><br />text1+=<span style="color: #ff0000;">"realizado con Usted respecto de los lotes de la referencia, Usted presenta incumplimiento "</span><br />text1+=<span style="color: #ff0000;">"en los pagos acordados, razón por la cual se ha constituido en mora tal como lo establece el "</span><br />text1+=<span style="color: #ff0000;">"Art. 1608 del Código Civil que reza: La mora en los contratos bilaterales, "</span><br />text1+=<span style="color: #ff0000;">"EL DEUDOR ESTÁ EN MORA: 1. Cuando no ha cumplido la obligación dentro del término estipulado."</span><br /><br />text2:=<span style="color: #ff0000;">"El valor que Usted adeuda a la fecha es "</span><br /><br />text4:=<span style="color: #ff0000;">"De acuerdo con lo anterior le solicito ponerse al día en el pago de su obligación dentro de los tres (3) "</span><br />text4+=<span style="color: #ff0000;">"días hábiles siguientes al recibo de la presente notificación so pena de dar por terminado de manera "</span><br />text4+=<span style="color: #ff0000;">"unilateral el contrato de compraventa y exigir la entrega del inmueble."</span><br /><br />text5:=<span style="color: #ff0000;">"Es pertinente recordarle que su compromiso al momento de la compra fue el de pagar la cuota mensual "</span><br />text5+=<span style="color: #ff0000;">"del lote objeto de compraventa dentro de los CINCO (05) primeros días de cada mes, so pena de perder "</span><br />text5+=<span style="color: #ff0000;">"el derecho a la posesión y tenencia del lote y demás derechos adquiridos, puesto que el incumplimiento de la "</span><br />text5+=<span style="color: #ff0000;">"obligación conlleva a la empresa a tomar medidas de recuperación del Lote mencionado sin derecho a "</span><br />text5+=<span style="color: #ff0000;">"devolver el valor de las mejoras realizadas en el predio, además, perderá los bonos en dinero "</span><br />text5+=<span style="color: #ff0000;">"otorgados por mera liberalidad del Vendedor."</span><br /><br />text6:=<span style="color: #ff0000;">"De igual manera, al hacer parte del Proyecto de Vivienda Ciudadela La Bendición, se encuentra "</span><br />text6+=<span style="color: #ff0000;">"inmerso el pago de la acometida para el agua y la energía de su vivienda y de la colecta mensual "</span><br />text6+=<span style="color: #ff0000;">"por concepto de potabilización de agua y mantenimiento de redes eléctricas, pagos que a la fecha "</span><br />text6+=<span style="color: #ff0000;">"no se han realizado; otro hecho que constituye incumplimiento de su parte, motivo que conlleva "</span><br />text6+=<span style="color: #ff0000;">"a la suspensión del suministro de estos servicios."</span><br /><br />text7:=<span style="color: #ff0000;">"Nota: Si a la fecha del recibido de la presente notificación Usted se encuentra al día en el pago "</span><br />text7+=<span style="color: #ff0000;">"de sus cuotas, favor hacer caso omiso a esta comunicación y allegar los respectivos "</span><br />text7+=<span style="color: #ff0000;">"soportes de pago a la oficina."</span><br /><br /><br />EASYREPORT oVRD <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">".<span style="color: #000000;">\r</span>eport<span style="color: #000000;">\N</span>OTIFICACION.vrd"</span> PREVIEW <span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> oVRD:<span style="color: #000000;">lDialogCancel</span> = .T.<br /> <span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> .F. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> PRINTAREA <span style="color: #000000;">1</span> <span style="color: #0000ff;">OF</span> oVRD;<br /> ITEMIDS <span style="color: #000000;">{</span><span style="color: #000000;">101</span>,<span style="color: #000000;">103</span>,<span style="color: #000000;">104</span>,<span style="color: #000000;">105</span>,<span style="color: #000000;">106</span>,<span style="color: #000000;">107</span>,<span style="color: #000000;">109</span>,<span style="color: #000000;">110</span>,<span style="color: #000000;">111</span><span style="color: #000000;">}</span>;<br /> ITEMVALUES <span style="color: #000000;">{</span>vBar,nFecha,alltrim<span style="color: #000000;">(</span>nomb<span style="color: #000000;">)</span>,nCedu,nDire,nTele,nRefe,text1,text2<span style="color: #000000;">}</span><br /><br /> PRINTAREA <span style="color: #000000;">3</span> <span style="color: #0000ff;">OF</span> oVRD;<br /> ITEMIDS <span style="color: #000000;">{</span><span style="color: #000000;">301</span>,<span style="color: #000000;">302</span>,<span style="color: #000000;">303</span>,<span style="color: #000000;">304</span><span style="color: #000000;">}</span>;<br /> ITEMVALUES <span style="color: #000000;">{</span>text4,text5,text6,text7<span style="color: #000000;">}</span><br /><br />END EASYREPORT oVRD<br /><br /> </div>[/code:9h1frp19]
Dentro de la variable text5, necesito resaltar el siguiente texto "CINCO (05) primeros días de cada mes".
Saludos |
Colocar Negrilla en mitad del texto | Leandro,
Otto es un gran experto con EasyReport, igual él puede ayudarnos en esto |
Colocar Negrilla en mitad del texto | Hello,
can you please post a screenshot how the report should look.
I am sorry I do not quiet understand the problem.
If I understand well you want a different look depending on the content of the line.
If this is the problem he needs to declare a extra PRINTAREA and then a if else endif.
If A = .t.
PRINTAREA 1 OF oVRD;
ITEMIDS {101,103,104,105,106,107,109,110,111};
ITEMVALUES {vBar,nFecha,alltrim(nomb),nCedu,nDire,nTele,nRefe,text1,text2}
Else
PRINTAREA 3 OF oVRD;
ITEMIDS {101,103,104,105,106,107,109,110,111};
ITEMVALUES {vBar,nFecha,alltrim(nomb),nCedu,nDire,nTele,nRefe,text1,text2}
endif
otherwise you can change
method say in vrd.prg.
Best regards,
Otto |
Colocar Negrilla en mitad del texto | Otto Muchas Gracias por Responder
[i:1tkafy45]Otto Thanks for answering[/i:1tkafy45]
Lo que necesito, es colocar en negrilla únicamente el texto que esta encerrado con los óvalos en rojo. No es todo
el texto únicamente el valor en letras de lo que debe el usuario.
[i:1tkafy45]What I need is to put in bold only the text that is enclosed with red ovals . Not all
the text only the value in words what must the user.[/i:1tkafy45]
Espero haberme hecho entender.
[i:1tkafy45]I hope I made ??my point .[/i:1tkafy45]
Mira adjunto la imagen
[i:1tkafy45]Look at the picture attached[/i:1tkafy45]
[url=http://postimg.org/image/72u3h8irj/full/:1tkafy45][img:1tkafy45]http://s3.postimg.org/72u3h8irn/negrilla.png[/img:1tkafy45][/url:1tkafy45]
[url=http://postimage.org/index.php?lang=spanish:1tkafy45]subefotos[/url:1tkafy45]
y el codigo que genera ese reporte.
[code=fw:1tkafy45]<div class="fw" id="{CB}" style="font-family: monospace;">********************************<br />*Imprime Contrato de Compraventa<br />********************************<br /><span style="color: #00C800;">FUNCTION</span> pNotificaCobro<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">local</span> text1,text2,nomb<br />uFec:=dtoc<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />uTim:=subs<span style="color: #000000;">(</span>time<span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">8</span><span style="color: #000000;">)</span><br /><br />dia:=day<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />mes:=oLamcla:<span style="color: #000000;">vMese</span><span style="color: #000000;">[</span>month<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">]</span><br />ano:=<span style="color: #0000ff;">year</span><span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />nDia:=Letras<span style="color: #000000;">(</span>dia<span style="color: #000000;">)</span><br /><br />vRGman:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"id_manzana"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br />vRGlot:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"id_lote"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br />vRGter:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"docu_terce"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br />vRGtel:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"telefono"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"C"</span><span style="color: #000000;">)</span><br />vRGdir:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"direccion"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"C"</span><span style="color: #000000;">)</span><br />vRGexp:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"expedida"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"C"</span><span style="color: #000000;">)</span><br />vRGres:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"residencia"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"C"</span><span style="color: #000000;">)</span><br />vRGmts:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"mts2"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br />vRGcbe:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"cedula_benefi"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br />vRGnbe:=oRsDocfac:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"nombre_benefi"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /><br />tVar := <span style="color: #000000;">{</span>|| vArray:=oLamcla:<span style="color: #000000;">pRetornoarra2</span><span style="color: #000000;">(</span><span style="color: #000000;">3</span>,alltrim<span style="color: #000000;">(</span>vRGter<span style="color: #000000;">)</span>,<span style="color: #000000;">30</span><span style="color: #000000;">)</span>,nomb:=vArray<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><span style="color: #000000;">}</span><br />EVAL<span style="color: #000000;">(</span> tVar <span style="color: #000000;">)</span><br />vBar:=<span style="color: #ff0000;">"DIR-"</span>+strzero<span style="color: #000000;">(</span>vRGman,<span style="color: #000000;">3</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">"-"</span>+strzero<span style="color: #000000;">(</span>vRGlot,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//BUSCAMOS EL VALOR DE LA DEUDA EN LA TABLA TEMPORAL PARA</span><br /><span style="color: #B900B9;">//PODER GESTIONAR LAS NOTIFICACIONES DE COBRO</span><br />oVar:=<span style="color: #ff0000;">"SELECT * from lyma_deuda_temporal WHERE id_proyecto=1 AND id_manzana="</span>+lTransPic<span style="color: #000000;">(</span>vRGman<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" AND id_lote="</span>+lTransPic<span style="color: #000000;">(</span>vRGlot<span style="color: #000000;">)</span><br />oRs7 := FW_OPENRECORDSET<span style="color: #000000;">(</span>oLamcla:<span style="color: #000000;">oCon</span>,oVar,adLockOptimistic,adOpenKeyset<span style="color: #000000;">)</span><br />nRegistros := oRs7:<span style="color: #000000;">RecordCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">if</span> nRegistros#<span style="color: #000000;">0</span><br /> v_deuda:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRs7:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"deuda_lote"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"N"</span><span style="color: #000000;">)</span><br /> v_servi:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRs7:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"deuda_acom"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"N"</span><span style="color: #000000;">)</span><br /> v_acome:=oLamcla:<span style="color: #000000;">cNoNulo</span><span style="color: #000000;">(</span>oRs7:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"deuda_serv"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>,<span style="color: #ff0000;">"N"</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">else</span><br /> v_deuda:=v_servi:=v_acome:=<span style="color: #000000;">0</span><br /><span style="color: #00C800;">endif</span><br /><br />vTDeuda:=alltrim<span style="color: #000000;">(</span>Transform<span style="color: #000000;">(</span>v_deuda+v_servi+v_acome,oLamcla:<span style="color: #000000;">pic2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />nTDeuda:=letras<span style="color: #000000;">(</span>v_deuda+v_servi+v_acome<span style="color: #000000;">)</span><br /><br />nFecha:=<span style="color: #ff0000;">"Yopal, "</span>+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>dia<span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">" de "</span>+alltrim<span style="color: #000000;">(</span>mes<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" de "</span>+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>ano<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />nCedu:=<span style="color: #ff0000;">"C.C.No.: "</span>+alltrim<span style="color: #000000;">(</span>vRGter<span style="color: #000000;">)</span><br />nDire:=<span style="color: #ff0000;">"Direccion: "</span>+alltrim<span style="color: #000000;">(</span>vRGdir<span style="color: #000000;">)</span><br />nTele:=<span style="color: #ff0000;">"Telefono: "</span>+alltrim<span style="color: #000000;">(</span>vRGtel<span style="color: #000000;">)</span><br />nRefe:=<span style="color: #ff0000;">"COMPRAVENTA DE LOTE No. "</span>+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>vRGlot<span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">" Mz. "</span>+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>vRGman<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br />text1:=<span style="color: #ff0000;">"NOMBRE DEL GERENTE, en mi calidad de Representante Legal de la Ciudadela La "</span><br />text1+=<span style="color: #ff0000;">"Ciudadela La Bendición, de manera formal y ante el caso omiso a los llamados de cobro "</span><br />text1+=<span style="color: #ff0000;">"verbales, me permito comunicarle que de acuerdo con el contrato de compraventa verbal "</span><br />text1+=<span style="color: #ff0000;">"realizado con Usted respecto de los lotes de la referencia, Usted presenta incumplimiento "</span><br />text1+=<span style="color: #ff0000;">"en los pagos acordados, razón por la cual se ha constituido en mora tal como lo establece el "</span><br />text1+=<span style="color: #ff0000;">"Art. 1608 del Código Civil que reza: La mora en los contratos bilaterales, "</span><br />text1+=<span style="color: #ff0000;">"EL DEUDOR ESTÁ EN MORA: 1. Cuando no ha cumplido la obligación dentro del término estipulado."</span><br /><br /><span style="color: #00C800;">if</span> v_deuda#<span style="color: #000000;">0</span><br /> nTCredi:=<span style="color: #ff0000;">" por concepto de CUOTAS: "</span>+letras<span style="color: #000000;">(</span>v_deuda<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" PESOS ("</span>+alltrim<span style="color: #000000;">(</span>Transform<span style="color: #000000;">(</span>v_deuda,oLamcla:<span style="color: #000000;">pic2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">") M/CTE"</span><br /><span style="color: #00C800;">else</span><br /> nTCredi:=space<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">if</span> v_acome#<span style="color: #000000;">0</span><br /> nTAcome:=<span style="color: #ff0000;">" por concepto de ACOMETIDA AGUA: "</span>+letras<span style="color: #000000;">(</span>v_acome<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" PESOS ("</span>+alltrim<span style="color: #000000;">(</span>Transform<span style="color: #000000;">(</span>v_acome,oLamcla:<span style="color: #000000;">pic2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">") M/CTE"</span><br /><span style="color: #00C800;">else</span><br /> nTAcome:=space<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">if</span> v_servi#<span style="color: #000000;">0</span><br /> v_servi:=<span style="color: #ff0000;">" por concepto de SERVICIOS PUBLICOS: "</span>+letras<span style="color: #000000;">(</span>v_servi<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" PESOS ("</span>+alltrim<span style="color: #000000;">(</span>Transform<span style="color: #000000;">(</span>v_servi,oLamcla:<span style="color: #000000;">pic2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">") M/CTE"</span><br /><span style="color: #00C800;">else</span><br /> v_servi:=space<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">endif</span><br /><br />text2:=<span style="color: #ff0000;">"El valor que Usted adeuda a la fecha es "</span>+nTDeuda+<span style="color: #ff0000;">" PESOS ("</span>+vTDeuda+<span style="color: #ff0000;">") M/CTE "</span><br />text2+=<span style="color: #ff0000;">"por los siguientes conceptos:"</span>+nTCredi+nTAcome+v_servi+<span style="color: #ff0000;">"."</span><br /><br />text4:=<span style="color: #ff0000;">"De acuerdo con lo anterior le solicito ponerse al día en el pago de su obligación dentro de los tres (3) "</span><br />text4+=<span style="color: #ff0000;">"días hábiles siguientes al recibo de la presente notificación so pena de dar por terminado de manera "</span><br />text4+=<span style="color: #ff0000;">"unilateral el contrato de compraventa y exigir la entrega del inmueble."</span><br /><br />text5:=<span style="color: #ff0000;">"Es pertinente recordarle que su compromiso al momento de la compra fue el de pagar la cuota mensual "</span><br />text5+=<span style="color: #ff0000;">"del lote objeto de compraventa dentro de los CINCO (05) primeros días de cada mes, so pena de perder "</span><br />text5+=<span style="color: #ff0000;">"el derecho a la posesión y tenencia del lote y demás derechos adquiridos, puesto que el incumplimiento de la "</span><br />text5+=<span style="color: #ff0000;">"obligación conlleva a la empresa a tomar medidas de recuperación del Lote mencionado sin derecho a "</span><br />text5+=<span style="color: #ff0000;">"devolver el valor de las mejoras realizadas en el predio, además, perderá los bonos en dinero "</span><br />text5+=<span style="color: #ff0000;">"otorgados por mera liberalidad del Vendedor."</span><br /><br />text6:=<span style="color: #ff0000;">"De igual manera, al hacer parte del Proyecto de Vivienda Ciudadela La Bendición, se encuentra "</span><br />text6+=<span style="color: #ff0000;">"inmerso el pago de la acometida para el agua y la energía de su vivienda y de la colecta mensual "</span><br />text6+=<span style="color: #ff0000;">"por concepto de potabilización de agua y mantenimiento de redes eléctricas, pagos que a la fecha "</span><br />text6+=<span style="color: #ff0000;">"no se han realizado; otro hecho que constituye incumplimiento de su parte, motivo que conlleva "</span><br />text6+=<span style="color: #ff0000;">"a la suspensión del suministro de estos servicios."</span><br /><br />text7:=<span style="color: #ff0000;">"Nota: Si a la fecha del recibido de la presente notificación Usted se encuentra al día en el pago "</span><br />text7+=<span style="color: #ff0000;">"de sus cuotas, favor hacer caso omiso a esta comunicación y allegar los respectivos "</span><br />text7+=<span style="color: #ff0000;">"soportes de pago a la oficina."</span><br /><br /><br />EASYREPORT oVRD <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">".<span style="color: #000000;">\r</span>eport<span style="color: #000000;">\N</span>OTIFICACION.vrd"</span> PREVIEW <span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> oVRD:<span style="color: #000000;">lDialogCancel</span> = .T.<br /> <span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> .F. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> PRINTAREA <span style="color: #000000;">1</span> <span style="color: #0000ff;">OF</span> oVRD;<br /> ITEMIDS <span style="color: #000000;">{</span><span style="color: #000000;">101</span>,<span style="color: #000000;">103</span>,<span style="color: #000000;">104</span>,<span style="color: #000000;">105</span>,<span style="color: #000000;">106</span>,<span style="color: #000000;">107</span>,<span style="color: #000000;">109</span>,<span style="color: #000000;">110</span>,<span style="color: #000000;">111</span><span style="color: #000000;">}</span>;<br /> ITEMVALUES <span style="color: #000000;">{</span>vBar,nFecha,alltrim<span style="color: #000000;">(</span>nomb<span style="color: #000000;">)</span>,nCedu,nDire,nTele,nRefe,text1,text2<span style="color: #000000;">}</span><br /><br /> PRINTAREA <span style="color: #000000;">3</span> <span style="color: #0000ff;">OF</span> oVRD;<br /> ITEMIDS <span style="color: #000000;">{</span><span style="color: #000000;">301</span>,<span style="color: #000000;">302</span>,<span style="color: #000000;">303</span>,<span style="color: #000000;">304</span><span style="color: #000000;">}</span>;<br /> ITEMVALUES <span style="color: #000000;">{</span>text4,text5,text6,text7<span style="color: #000000;">}</span><br /><br />END EASYREPORT oVRD<br /> </div>[/code:1tkafy45] |
Colocar Negrilla en mitad del texto | Leandro,
la frase que comienza con "Notificación de cobro..." está en negrita.
Donde está indicado que se vea en negrita en tu código ? |
Colocar Negrilla en mitad del texto | Hello,
maybe we can extend method say
Pseudocode
if isrtf( cText )
oRTF:print
else
TextOut( ::oPrn:hDCOut, nRow, nCol, cText )
endif
Best regards,
Otto
METHOD Say( nRow, nCol, cText, oFont, nWidth, nClrText, nBkMode, nPad ) CLASS VRD
IF ::oPrn:hDC = 0
RETURN NIL
ENDIF
DEFAULT oFont := ::oPrn:oFont
DEFAULT nBkMode := 1
DEFAULT nPad := 0
IF oFont != nil
oFont:Activate( ::oPrn:hDCOut )
ENDIF
// 1,2 transparent or Opaque
SetbkMode( ::oPrn:hDCOut, nBkMode )
IF nClrText != NIL
#IFDEF __HARBOUR__
SetTextColor( ::oPrn:hDCOut, nClrText )
#ELSE
SetTextCol( ::oPrn:hDCOut, nClrText )
#ENDIF
ENDIF
DO CASE
CASE nPad == 1 // right
nCol := Max( 0, nCol - ::GetTextWidth( cText, oFont ) )
CASE nPad == 2 // center
nCol := Max( 0, nCol - ( ::GetTextWidth( cText, oFont ) / 2 ) )
ENDCASE
Pseudocode
if isrtf( cText )
oRTF:print
else
TextOut( ::oPrn:hDCOut, nRow, nCol, cText )
endif
IF oFont != nil
oFont:DeActivate( ::oPrn:hDCOut )
ENDIF
RETURN ( NIL ) |
Colocar Negrilla en mitad del texto | Otto,
if we provide a bold font to Method Say() then it should do it. |
Colocar Negrilla en mitad del texto | Antonio buenos días..
En la linea REF: lo que pasa es que son los cuadros de texto diferentes, en ese caso es fácil hacerlo.
El problema es cuando es un solo párrafo y dentro del párrafo debo resaltar unas palabras en especifico.
[url=http://postimg.org/image/oq7xcumpr/full/:365nk7ah][img:365nk7ah]http://s11.postimg.org/ha8nr1z0j/easy.png[/img:365nk7ah][/url:365nk7ah]
[url=http://postimage.org/index.php?lang=spanish:365nk7ah]subir imagenes[/url:365nk7ah]
Creo que no me hecho entender....
Mira el texto en este momento se muestra asi:
De igual manera, al hacer parte del Proyecto de Vivienda Ciudadela La Bendición, se encuentra inmerso el pago de la acometida para el agua y la energía de su vivienda y de la colecta mensual por concepto de potabilización de agua y mantenimiento de redes eléctricas, pagos que a la fecha no se han realizado; otro hecho que constituye incumplimiento de su parte, motivo que conlleva a la suspensión del suministro de estos servicios.
Lo que quiero es que me salga asi:
De igual manera, al hacer parte del Proyecto de Vivienda [b:365nk7ah]Ciudadela La Bendición[/b:365nk7ah], se encuentra inmerso el pago de la acometida para el agua y la energía de su vivienda y de la colecta mensual por concepto de potabilización de agua y mantenimiento de redes eléctricas, pagos que a la fecha no se han realizado; otro [b:365nk7ah]hecho que constituye incumplimiento de su parte[/b:365nk7ah], motivo que conlleva a la suspensión del suministro de estos servicios.
Saludos |
Colocar Negrilla en mitad del texto | Leandro,
Si localizásemos en que método se imprime ese texto, podriamos usar unas marcas en el texto para indicar negrita. |
Colocar Negrilla en mitad del texto | Leandro,
hay una solución muy simple:
crea otro item con el texto que quieres poner en negrita, usando un font bold, y sobreponlo encima del texto que quieres resaltar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Colocar Negrilla en mitad del texto | Dear Antonio,
but how do you get nRow, nCol for this new Item?
Best regards,
Otto |
Colocar Negrilla en mitad del texto | Otto,
I did it manually using the EasyReport designer <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Colocar Negrilla en mitad del texto | The problem we face there is that Windows TextOut() is used to paint the text and that function does not support such formatting.
Yesterday I thought about painting twice, first in bold then again in no bold, but the bold parts should be turned into spaces
and that will not properly fit in the exact place.
Thats why I finally realized that we can use another bold item placed on top of the text we want to be bold.
Not sure if the final result will be fine. But I think it could be a valid solution. |
Colocar Negrilla en mitad del texto | Dear Antonio,
can you please help to Change this pseudocode
if isrtf( cText )
oRTF:print
else
TextOut( ::oPrn:hDCOut, nRow, nCol, cText )
endif
in valid FW code.
Thanks in advance
Otto |
Colocar Negrilla en mitad del texto | Dear Otto,
The problem is in this line:
oRTF:Print()
We need to create a TRichEdit() object there and keep it hidden and then destroy it.
And function RePrint() used from Class TRichEdit needs to be modified.
Do you also have the same need as Leandro ? |
Colocar Negrilla en mitad del texto | Dear Antonio,
I think this would be a great extension to EasyReport.
I tried to modify the paint method of Flatbutton class to use RichText.
This would offer great graphical opportunities.
But I have no idea how painting speed would be.
Best regards,
Otto |
Colocar Negrilla en mitad del texto | Otto,
I am reviewing similar questions in StackOverflow:
[url:3vs99j93]http://stackoverflow.com/search?q=paint+rich+text[/url:3vs99j93]
Its not easy as Windows does not provide a way to do it.
I think that a possible solution would be to let a RichEdit control paint it and then copying its image as a bitmap.
Thinking about it... |
Colocar apuntador del mouse en un boton | Se que con:
SETCURSORPOS(Columna,Renglon)
puedo colocar el apuntador del mouse en esas coordenadas
y que con
oBtn:NLEFT y oBtn:NTOP
puedo obtener la esquina superior izquierda del boton
sin embargo usando SETCURSORPOS(oBtn:NLEFT,oBtn:NTOP) no se coloca ni siquiera dentro del dialogo, como que unas coordenadas son pixeles y otras en columnas y renglones. Como obtengo las coordenadas correctas?
Gracias |
Colocar la ñ en Browser | Saludos Al Forum
Como hago para que me muestre la ñ a este browser, ya que muestra un caracter esecial.
column := TbcolumnNew( "Año", ;
{|p| If( p == NIL, ::aArray[nSubscript,3],;
::aArray[nSubscript,3] := p)}) |
Colocar la ñ en Browser | column := TbcolumnNew( OemToAnsi("Año"), ;
{|p| If( p == NIL, ::aArray[nSubscript,3],;
::aArray[nSubscript,3] := p)})
Depende mucho del editor de textos que uses también. |
Colocar la ñ en Browser | Gracias.
En el editor si lo colo bien, en problema es en la ejecucion,no lo muestra.
tu ejemplo no me funciono |
Colocar texto centrado vertical con BTNBMP | Hola a todos
Tengo un botón desde recurso y no logro colocar el texto centrado verticalmente
[img:2i7b1p2v]http://200.58.169.10/paquetes/boton.png[/img:2i7b1p2v]
[code=fw:2i7b1p2v]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RESNAME</span> <span style="color: #ff0000;">"Boton1"</span>,<span style="color: #00C800;">Nil</span>,<span style="color: #00C800;">Nil</span>,<span style="color: #ff0000;">"BotonOver"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cobranzas"</span> <span style="color: #0000ff;">ACTION</span> Cobranzas<span style="color: #000000;">(</span><span style="color: #000000;">)</span> NOBORDER <span style="color: #0000ff;">CENTER</span><br /> </div>[/code:2i7b1p2v]
Con SBUTTON y oBTN:SetText funciona perfecto.
Gracias por la ayuda
Saludos
Adhemar |
Colocar un Combobox dentro de un browse? | amigos del foro buenas tardes.. como dice el encabezado.
Se puede colocar un combobox dentro de on browse?...
De nuevo gracias |
Colocar un Combobox dentro de un browse? | Leandro,
Si es posible.
Puedes hacerlo con TSBrowse (lo encontrarás en utilidades).
También puedes lograr algo parecido con la clase TXBrowse, valiéndote de un botón y de otras maneras, los campos lógicos se presentan como combobox, en fin puedes consultar la documentación que viene para ambas clases, una está en el manual de Fivewin (fivewin_es) para el caso de TXbrowse y tienes ejemplo en fwh\samples\testxbrw.prg y la otra está en los documento txt y el directorio \doc en el zip que podrás bajar del foro "Utilities/Utilidades"
Para el caso de TSBrowse, encontrarás en el zip varios ejemplos donde fijarte.
Espero que te haya ayudado, adelante!! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
FWH es lo mejor que me ha pasado!! |
Colocar un Combobox dentro de un browse? | Claro amigo muchas gracias por tu respuesta lo voy a poner el práctica. |
Colocar un Dialogo debajo de una casilla en Xbrowse | Saludos
Cordiales
Necesito ubicar una caja de dialogo justo debajo de la casilla (Linea, Columna) focalizada en Xbrowse |
Colocar un Dialogo debajo de una casilla en Xbrowse | Juan,
En el Método ShowBtnList( nKey ) CLASS TXBrwColumn (en xbrowse.prg) se calculan las coordenadas de una determinada celda:
[code=fw:awzz8lrr]<div class="fw" id="{CB}" style="font-family: monospace;"> nRow := <span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nRowSel</span> * ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nRowHeight</span> <span style="color: #000000;">)</span> + ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">HeaderHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">1</span><br /> nCol := ::<span style="color: #000000;">nDisplayCol</span> - <span style="color: #000000;">2</span><br /> </div>[/code:awzz8lrr]
Ahora tendrias que pasar esas coordenadas a valores de la pantalla completa:
local aPoint := { nRow, nCol }
aPoint = ClientToScreen( oBrowse:hWnd, aPoint )
Y desde la claúsula ON INIT de tu diálogo, posicionarlo en esas coordenadas:
[code=fw:awzz8lrr]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span> aPoint<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, aPoint<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span></div>[/code:awzz8lrr] |
Colocar un Dialogo debajo de una casilla en Xbrowse | Antonio
Gracias, tenia este codigo copiado de la clase txbrwcol
LOCAL oDlg
LOCAL oCol := oBrw:aCols[oBrw:nColSel]
LOCAL nRow := ( ( oBrw:nRowSel - 1 ) * oBrw:nRowHeight ) + oBrw:HeaderHeight() + 2
LOCAL nCol := oCol:nDisplayCol + 3
LOCAL nWidth := oCol:nWidth - 4
LOCAL nHeight := oCol:oBrw:nRowHeight - 4
DEFINE DIALOG oDlg OF oBrw:oWnd
ACTIVATE DIALOG oDlg ON INIT (oDlg:Move(nRow, nCol, nWidth+200, nHeight+100, .t. )) |
Colocar un Treeview en un Splitter | Saludos foro,
Alguien ha hecho esto? |
Colocar un Treeview en un Splitter | Mira en:
[code=fw:3eyj0bbs]<div class="fw" id="{CB}" style="font-family: monospace;">Samples\testtre2.prg</div>[/code:3eyj0bbs] |
Colocar un Treeview en un Splitter | Gracias Byron! |
Colocar un Treeview en un Splitter | Byron,
Lo que realmente quisiera ver es como colocar el Treeview en un control Outlook2003. No consegui ejemplo de eso en el foro
Saludos, |
Colocar un dialogo en una posicion determinada | Hola, amigos como puedo colocar un DIALOGO EN UNA COORDENADA X,Y
Gracias,
Juan
Rep. Dom. |
Colocar un dialogo en una posicion determinada | Juan:
Prueba con el siguiente código:
[code=fw:18qt58du]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NOWAIT</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #0000ff;">MOVE</span><span style="color: #000000;">(</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /> </div>[/code:18qt58du]
Lo importante es oDlg:MOVE(0,0) donde 0,0 son las coordenadas que deseas en la ventana
que contiene al dialogo.
Saludos |
Colocar un dialogo en una posicion determinada | Solucionado con tu asistencia, gracias por tú atención.
Saludos,
Juan Fco.
Rep. Dom. |
Colocar un tiempo a un Dialogo o a un Browse | Como están amigos del foro tengo una duda a ver si ustedes me pueden ayudar es que tengo un browse el cual quiero colocarle un determinado tiempo para que el automáticamente se valla actualizando y se refresque y ejecute una instruccion en el momento que cunpla en tiempo que le asigne y que no se salga hasta que presione el boton de salida que siempre se mantenga activo actualizandose
de antemanos gracias |
Colocar un tiempo a un Dialogo o a un Browse | [url:1fqfzwn2]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=36237&p=216167&hilit=Timer#p216167[/url:1fqfzwn2] |
Colocar una imagen en el titulo de un dialogo. | Buenos dias!!!
Necesito colocar una imágen o varias (bmp, jpg, ... ) dentro del titulo de un dialogo.
Se Puede realizar?
Como?
Gracias |
Colocar una imagen en el titulo de un dialogo. | No que yo sepa. Solo puede poner un ICONE.
[code=fw:38b4o3k7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// ---------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// MNUNEW05.PRG</span><br /><span style="color: #B900B9;">// Prueba de nuevas caracteristicas en menus</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">// ---------------------------------------------------------------------//</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> MF_BYPOSITION <span style="color: #000000;">1024</span> <span style="color: #B900B9;">// 0x0400</span><br /><span style="color: #00D7D7;">#define</span> MF_DISABLED <span style="color: #000000;">2</span><br /><br /><span style="color: #00C800;">Static</span> oWnd<br /><span style="color: #00C800;">Static</span> oFontMenu<br /><span style="color: #00C800;">Static</span> oBr<br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> cFont := <span style="color: #ff0000;">"Segoe UI Symbol"</span><br /> <span style="color: #00C800;">Local</span> cFontH := <span style="color: #000000;">-14</span> <br /> <span style="color: #00C800;">Local</span> oBar<br /> <span style="color: #00C800;">Local</span> cTitle<br /> <span style="color: #00C800;">Local</span> oIcon<br /> <span style="color: #00C800;">Local</span> cVar1 := <span style="color: #ff0000;">"???"</span><br /> <span style="color: #00C800;">Local</span> nHt := <span style="color: #000000;">0</span><br /><br /> Fw_SetUnicode<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /> SetResDebug<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> !IsWin8<span style="color: #000000;">(</span><span style="color: #000000;">)</span> .and. !IsWindows10<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> cFont := <span style="color: #ff0000;">"Calibri"</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontMenu <span style="color: #0000ff;">NAME</span> cFont <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, cFontH<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIcon FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\i</span>cons<span style="color: #000000;">\m</span>enu.ico"</span><br /><br /> cTitle := <span style="color: #ff0000;">" Pruebas de Menus: Font - "</span> + <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !Empty<span style="color: #000000;">(</span> oFontMenu <span style="color: #000000;">)</span>, oFontMenu:<span style="color: #000000;">cFaceName</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> +;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> !Empty<span style="color: #000000;">(</span> oFontMenu <span style="color: #000000;">)</span>, Str<span style="color: #000000;">(</span> oFontMenu:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">" - Redefine SYSMENU - 5"</span><br /><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">3</span>,<span style="color: #000000;">6</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">100</span> ;<br /> <span style="color: #0000ff;">TITLE</span> cTitle <span style="color: #0000ff;">COLOR</span> CLR_WHITE, METRO_OLIVE<br /><br /> oWnd:<span style="color: #000000;">SetIcon</span><span style="color: #000000;">(</span> oIcon <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> DisableX<span style="color: #000000;">(</span> oWnd, .T.<span style="color: #000000;">)</span> , BuildMnu0<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">(</span> oFontMenu <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">While</span> oFontMenu:<span style="color: #000000;">nCount</span> > <span style="color: #000000;">0</span><br /> oFontMenu:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Enddo</span><br /><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #B900B9;">// RELEASE BRUSH oBr</span><br /><br /> oIcon:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">if</span> File<span style="color: #000000;">(</span> <span style="color: #ff0000;">"checkres.txt"</span> <span style="color: #000000;">)</span><br /><br /> FErase<span style="color: #000000;">(</span> <span style="color: #ff0000;">"checkres.txt"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">endif</span><br /><br /> CheckRes<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><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> BuildMnu0<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">local</span> oMnu<br /><br /> <span style="color: #0000ff;">REDEFINE</span> SYSMENU oMnu <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">FONT</span> oFontMenu<br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SubMenu"</span> CHARICON <span style="color: #000000;">57605</span><br /> <span style="color: #0000ff;">MENU</span> <span style="color: #000000;">2007</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Segundo Item"</span> CHARICON <span style="color: #000000;">57696</span><br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Tercer Item"</span> CHARICON <span style="color: #000000;">57736</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"????? (India)"</span><br /> <span style="color: #0000ff;">MENU</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"FIVEDIT"</span> <span style="color: #0000ff;">SEPARATOR</span> BOLD<br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Methods"</span> HSYSBITMAP <span style="color: #000000;">32761</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Datas"</span> HSYSBITMAP <span style="color: #000000;">32760</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Messages"</span> HSYSBITMAP <span style="color: #000000;">32744</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Messages"</span> HSYSBITMAP <span style="color: #000000;">32743</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"ClassData"</span> CHARICON <span style="color: #ff0000;">"M"</span><br /><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"SCINTILLA"</span> <span style="color: #0000ff;">SEPARATOR</span> <span style="color: #00C800;">BREAK</span> BOLD<br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Methods de Object"</span> CHECKED<br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Datas Values"</span> HSYSBITMAP <span style="color: #000000;">32739</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Messages Data"</span> CHARICON <span style="color: #000000;">57731</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Messages Method"</span> HSYSBITMAP <span style="color: #000000;">32741</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"ClassData Object"</span> HSYSBITMAP <span style="color: #000000;">32742</span><br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"??? (China)"</span> CHECKED<br /><br /> <span style="color: #0000ff;">SEPARATOR</span><br /> <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Reset Menu"</span> <span style="color: #0000ff;">ACTION</span> oMnu:<span style="color: #000000;">Reset</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> ENDSYSMENU<br /><br /><span style="color: #00C800;">Return</span> oMnu<br /><br /><span style="color: #B900B9;">// ---------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> DisableX<span style="color: #000000;">(</span>oWin, lDisable<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> hMenu := <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">LOCAL</span> nCount := <span style="color: #000000;">0</span><br /> <br /> <span style="color: #00C800;">DEFAULT</span> lDisable := .T.<br /> <br /> <span style="color: #00C800;">IF</span> lDisable<br /><br /> hMenu = GetSystemMenu<span style="color: #000000;">(</span>oWin:<span style="color: #000000;">hWnd</span>, .F.<span style="color: #000000;">)</span><br /> nCount = GetMItemCount<span style="color: #000000;">(</span>hMenu<span style="color: #000000;">)</span><br /><br /> ? nCount<br /> <br /> <span style="color: #00C800;">IF</span> oWin:<span style="color: #000000;">ClassName</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> = <span style="color: #ff0000;">"TDIALOG"</span><br /> RemoveMenu<span style="color: #000000;">(</span>hMenu, <span style="color: #000000;">0</span>, nOR<span style="color: #000000;">(</span> MF_BYPOSITION, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> RemoveMenu<span style="color: #000000;">(</span>hMenu, <span style="color: #000000;">0</span>, nOR<span style="color: #000000;">(</span> MF_BYPOSITION, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> RemoveMenu<span style="color: #000000;">(</span>hMenu, nCount - <span style="color: #000000;">1</span>, nOR<span style="color: #000000;">(</span> MF_BYPOSITION, MF_DISABLED<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> RemoveMenu<span style="color: #000000;">(</span>hMenu, nCount - <span style="color: #000000;">2</span>, nOR<span style="color: #000000;">(</span> MF_BYPOSITION, MF_DISABLED<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <br /> <span style="color: #00C800;">ELSE</span><br /> GetSystemMenu<span style="color: #000000;">(</span> oWin:<span style="color: #000000;">hWnd</span>, .T. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:38b4o3k7]
Ahora, en el DIALOGO si, se puede.
Regards, saludos. |
Colocar una imagen en el titulo de un dialogo. | Gracias Joao, por tu tiempo.
lo que buscaba era poner un titulo y algun (os) bmp o jpg.
Por ejemplo. "Propiedades "+un tilde de forma grafica.
Tambien podria haber sido un pequeño btnbmp o un checbox.
Gracias |
Colocar una imagen en el titulo de un dialogo. | [quote="José Camilo":jv4x97nr]Gracias Joao, por tu tiempo.
lo que buscaba era poner un titulo y algun (os) bmp o jpg.
Por ejemplo. "Propiedades "+un tilde de forma grafica.
Tambien podria haber sido un pequeño btnbmp o un checbox.
Gracias[/quote:jv4x97nr]
¿En el TÍTULO (Caption) del DIÁLOGO? Nunca he visto algo parecido en ningún lenguaje de programación. Lo que haría sería crear una BARRA DE BOTONES EN LA PARTE SUPERIOR DEL DIÁLOGO y luego sí, pondría todo lo que dijiste.
Salu2. |
Colocar una imagen en el titulo de un dialogo. | Gracias Joao.
Yo tampoco lo vi, solo imagine que si se podia colocar un texto y al definirlo se le pueden poner o quitar los botones de ayuda, minimizar y salida, se podia hacer algo como lo preguntado.
Muchas gracias por tu tiempo.
José Camilo |
Color | Hi
oSheet:Cells( nRow, 3 ):Value=trim(mname)
How to colour it blue ?
Thanks
ACWoo
Using FWH1510
bcc582 |
Color | oSheet:Cells(nRow,3):Font:Color = CLR_HBLUE |
Color | Thanks
Mr Massimo
It works.
Regards
ACWoo |
Color BTNBMP | Hola,
¿Habría manera de ponerle un color de fondo y color de texto a un botón tipo BTNBMP ? |
Color BTNBMP | Joaquín,
Solo tienes que modificar el método Paint() de la Clase TBtnBmp para implementar lo que necesites
Pruébalo y me comentas, gracias |
Color BUTTON KEY With DIALOG | Hello everybody.
How To change Color BUTTON Key With DIALOG From RESOURCE
--------
Like --->
DEFINE DIALOG Dlg RESOURCE "test"
REDEFINE BUTTON ID 2 OF RE_Dlg COLOR (RGB(255,255,255)),(RGB(190,197,248)) ACTION msginf("test color BUTTON Key ")
ACTIVATE DIALOG Dlg CENTERED
------
Thanks to all |
Color BUTTON KEY With DIALOG | Hathal,
Have you considered to use a TBtnBmp control instead of a standard button ?
REDEFINE BTNBMP ID 2 OF RE_Dlg COLOR ...
Also please change it in your resource |
Color BUTTON KEY With DIALOG | Antonio.
I want with standard button. |
Color BUTTON KEY With DIALOG | Mr.Hathal,
You can't use COLOR parameter with standard button.
Instead you can either BTNBMP or FLATBTN like this:
[code=fw:wpvyhrnk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> FLATBTN <span style="color: #0000ff;">ID</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">OF</span> RE_Dlg <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">(</span>RGB<span style="color: #000000;">(</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">(</span>RGB<span style="color: #000000;">(</span><span style="color: #000000;">190</span>,<span style="color: #000000;">197</span>,<span style="color: #000000;">248</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">ACTION</span> msginf<span style="color: #000000;">(</span><span style="color: #ff0000;">"test color BUTTON Key "</span><span style="color: #000000;">)</span><br /><br />or<br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">OF</span> RE_Dlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">(</span>RGB<span style="color: #000000;">(</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">(</span>RGB<span style="color: #000000;">(</span><span style="color: #000000;">190</span>,<span style="color: #000000;">197</span>,<span style="color: #000000;">248</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">ACTION</span> msginf<span style="color: #000000;">(</span><span style="color: #ff0000;">"test color BUTTON Key "</span><span style="color: #000000;">)</span><br /> </div>[/code:wpvyhrnk]
-Ramesh Babu |
Color BUTTON KEY With DIALOG | Hathal,
If you use FWH function SkinButtons() then you could change the colors of the standard buttons.
Please review FWH\samples\testfold.prg |
Color Dialog | Ciao,
Utilizzo GradBrush() per colorare lo sfondo delle fineste di dialogo e mi sono accorto che se passo da dialog 1 a dialog 2 il colore è ok. Mentre quando ritorno da dialog 2 a dialog 1 ed eseguo un refresh … dialog 1 prende il colore del 2 dialogbox .
Ho risolto facendo eseguire nuovamente GradBrush() dopo la chiusura del 2 dialog
@ 3, 2 BUTTON "dialog 2" OF oDlg [u:1sn1wear]ACTION (DIALOG2(),GradBrush( oDlg,nRGB( 255, 255, 255 ), rgb(255,246,143 ))) [/u:1sn1wear]
… ci sono altre idee ??
Gazie e Saluti
Stefano
un pezzo di codice per prova:
// Color Dialog test
#include "FiveWin.ch"
static oDlg,oDlg2
//----------------------------------------------------------------------------//
function Main()
DEFINE DIALOG oDlg TITLE "Dialog 1" FROM 0, 0 TO 20, 40 TRANSPARENT
@ 3, 2 BUTTON "dialog 2" OF oDlg ACTION DIALOG2()
* Per ottenere la pittura corretta
* @ 3, 2 BUTTON "dialog 2" OF oDlg ACTION (DIALOG2(),GradBrush( oDlg,nRGB( 255, 255, 255 ),rgb(255,246,143 )))
ACTIVATE DIALOG oDlg CENTERED ON INIT GradBrush( oDlg,nRGB( 255, 255, 255 ),rgb(255,246,143 ))
return nil
function DIALOG2()
DEFINE DIALOG oDlg2 TITLE "Dialog 2" FROM 0, 0 TO 10, 20 TRANSPARENT
@ 3, 2 BUTTON "dialog 1" OF oDlg2 ACTION (oDlg2:END(),oDlg:refresh())
ACTIVATE DIALOG oDlg2 CENTERED ON INIT GradBrush( oDlg2,nRGB( 255, 25, 25 ),nRGB(255, 69, 0))
return nil
STATIC FUNCTION GradBrush( oDlgkk,color1,color2)
local hDC, hBmp, hBmpOld,obrush
hDC = CreateCompatibleDC( oDlgkK:GetDC() )
hBmp = CreateCompatibleBitMap( oDlgkK:hDC, oDlgkK:nWidth, oDlgkK:nHeight )
hBmpOld = SelectObject( hDC, hBmp )
Gradient( hDC, {0, 0, oDlgkk:nHeight, oDlgKk:nWidth } ,color1,color2, .t. )
DeleteObject( oDlgkK:oBrush:hBrush )
oDlgkK:oBrush:hBitmap = hBmp
oDlgkK:oBrush:hBrush = CreatePatternBrush( hBmp )
SelectObject( hDC, hBmpOld )
oDlgKk:ReleaseDC()
RETURN (nil)
//-------------------------------------------------------------------//
DLL32 FUNCTION CREATECOMPATIBLEBITMAP( hDC AS LONG,;
nWidth AS LONG,;
nHeight AS LONG) AS LONG;
PASCAL FROM "CreateCompatibleBitmap" LIB "gdi32.dll" |
Color Dialog | Ho provato il tuo esempio ma non ho riscontrato il problema (almeno su XP). Comunque, se la tua versione la supporta, è meglio utilizzare la nuova clausola GRADIENT del comando DEFINE DIALOG.
Comunque, prova ad aggiungere anche la clausola ON PAINT con la chiamata a GradBrush().
EMG |
Color Dialog | Ciao Enrico ,
qualè la nuova clausola GRADIENT del comando DEFINE DIALOG ?
forse _GRADIENTBRUSH ?
Maurizio |
Color Dialog | Ops! Volevo dire la clausola GRADIENT del comando DEFINE BRUSH, sorry.
EMG |
Color Fill a GroupBox | To All
I am looking to color fill a groupbox like the screenshot below .. I do want the text to be transparent.
Any help would be appreciated!
Thanks
Rick Lipkin
[url=http://imageshack.us/photo/my-images/268/rickk.jpg/:396kegbl][img:396kegbl]http://img268.imageshack.us/img268/1830/rickk.jpg[/img:396kegbl][/url:396kegbl] |
Color Fill a GroupBox | Rick,
it is nor really transparent, just uses the same background-color !
[img:1jiq8ycg]http://www.pflegeplus.com/pictures/grpcolor.jpg[/img:1jiq8ycg]
DEFINE DIALOG oDlg1 FROM 30, 30 TO 500, 700 PIXEL ;
FONT oFont TITLE "DIALOG from Code" // TRANSPARENT
D_BACKGRD( oDlg1, nDStyle2, 16642248, 15714367, .F., 0.2, [color=#0000FF:1jiq8ycg]"BluStone.Bmp"[/color:1jiq8ycg] , "PICTURE9.jpg" )
Group include
// ------------
//@ <nTop>, <nLeft> GROUP [ <oGroup> ] ;
//[ TO <nBottom>, <nRight> ] ;
//[ <label:LABEL,PROMPT> <cLabel> ] ;
//[ OF <oWnd> ] ;
//[ COLOR <nClrFore> [color=#FF0000:1jiq8ycg][,<nClrBack>] [/color:1jiq8ycg]] ;
//[ <lPixel: PIXEL> ] ;
//[ <lDesign: DESIGN> ] ;
//[ FONT <oFont> ] ;
//[ <lTransparent: TRANSPARENT> ] ;
//[ SIZE <nWidth>, <nHeight> ] ;
@ 15, 15 GROUP oGrp1 TO 200, 300 PIXEL ;
PROMPT "Group" OF oDlg1
oGrp1:oFont := oFont
oGrp1:SetColor( 128, [color=#FF0000:1jiq8ycg]16642248[/color:1jiq8ycg] )
@ 100, 50 SAY oSay1 PROMPT "Transparent Text-test" OF oDlg1 PIXEL UPDATE ;
FONT oFont ;
SIZE 100, 12 COLOR 128, [color=#FF0000:1jiq8ycg]16642248[/color:1jiq8ycg]
// oSay1:lTransparent := .T.
// radio and checkbox works the same
@ 135, 50 RADIO oRadio VAR nRadio1 ITEMS "One", "Two", "Three" OF oDlg1 ;
SIZE 50, 13 PIXEL COLOR 128, [color=#FF0000:1jiq8ycg]16642248[/color:1jiq8ycg]
// @ 135, 120 CHECKBOX oChk1 VAR lChk1 PROMPT "Checkbox" OF oDlg1 PIXEL COLOR 128, [color=#FF0000:1jiq8ycg]16642248[/color:1jiq8ycg]
ACTIVATE DIALOG oDlg1 ;
ON INIT ( oDlg1:Move( 60, 30, oDlg1:nWidth, oDlg1:nHeight, .f. ) )
RETURN NIL
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Color Fill a GroupBox | Uwe
Thank you for your quick response .. I am using a SetDlgGradient( { { .50, nRGB( 216, 216, 216 ), nRGB( 255, 255, 255 ) } } ) to paint my dialogs ..
I take it
D_BACKGRD( oDlg1, nDStyle2, 16642248, 15714367, .F., 0.2, "BluStone.Bmp" , "PICTURE9.jpg" )
is a user defined function that paints a brush and the color goes over the top of the brush ?
Rick |
Color Fill a GroupBox | Rick,
it is a Dialog-background-function, to change a background at runtime ( works as well on Windows ) :
nStyle defines : 1 = color, 2 = gradient, 3 = BMP-brush and 4 = Image
[color=#0000FF:1csct4au]nStyle := 1 // Color ( can be canged at runtime )
nDColorF := 16642248 // 1. Gradient-color or Color
nDColorB := 15714367 // 2. Gradient-color
lDDirect := .T. // Gradient-direction .T. = Vertical
nDGradPos := 0.2 // Gradient-position
cDBrush := "BluStone.Bmp" // Bmp-brush
cDImage := "Fantasy2.Jpg" // Image[/color:1csct4au]
can be used on Dialogs => ON INIT :
ACTIVATE DIALOG oDlg1 ;
ON INIT ( [color=#0000FF:1csct4au]D_BACKGRD( oDlg1, nStyle, nDColorF, nDColorB, ;
lDDirect, nDGradpos, cDBrush, cDImage ), [/color:1csct4au];
oDlg1:Move( 60, 30, oDlg1:nWidth, oDlg1:nHeight, .f. ) )
c_path defines the Aplication-path :
[color=#FF0000:1csct4au]c_path[/color:1csct4au] := GETCURDIR()
// in older FWH-versions => c_path := CURDRIVE() + ":\" + GETCURDIR()
A Sample changing the Background :
[color=#0000FF:1csct4au]@ 200, 8 SELEX oSelect VAR nSelect SIZE 125, 30 OF oDlg1 PIXEL ;
ITEMS "&Color", "&Grad.", "Brush", "&Image";
GRADIENT OUTTRACK { { 0.5, 16443068, 16312263 }, { 0.5, 16312263, 16443068 } } ;
GRADIENT INTRACK { { 1, 5426223, 1071100 }, { 1, 1071100, 5426223 } } ;
THUMBSIZE 20, 20 ROUNDSIZE 5 ;
COLOR THUMB 14853684 ;
COLORTEXT 128, 32768 ;
TITLE "Select Dlg-Background" TOP ;
FONT oBrwFont ;
ACTION( nStyle := oSelect:nOption, ;
D_BACKGRD( oDlg1, nStyle, nDColorF, nDColorB, lDDirect, nDGradPos, cDBrush, cDImage))[/color:1csct4au]
[code=fw:1csct4au]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// -------- DIALOG - Background ---------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> D_BACKGRD<span style="color: #000000;">(</span> oDlg, nStyle, nColor1, nColor2, lDirect, nMove, cBrush, cImage<span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> oBrush<br /><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">1</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">COLOR</span> nColor1<br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">2</span><br /> aGrad := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> nMove, nColor1, nColor2 <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> nMove, nColor2, nColor1 <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> hDC = CreateCompatibleDC<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// Get Width and Height from INIT !!!</span><br /> hBmp = CreateCompatibleBitMap<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hDC</span>, oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /> hBmpOld = SelectObject<span style="color: #000000;">(</span> hDC, hBmp <span style="color: #000000;">)</span><br /> GradientFill<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oDlg:<span style="color: #000000;">nHeight</span>, oDlg:<span style="color: #000000;">nWidth</span>, aGrad, lDirect <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span><br /> oBrush := TBrush<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> ,,,, hBmp <span style="color: #000000;">)</span><br /> oBrush:<span style="color: #000000;">Cargo</span> := aGrad<br /> SelectObject<span style="color: #000000;">(</span> hDC, hBmpOld <span style="color: #000000;">)</span><br /> ReleaseDC<span style="color: #000000;">(</span>hDC<span style="color: #000000;">)</span><br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">3</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILE c_path + <span style="color: #ff0000;">"<span style="color: #000000;">\I</span>mages<span style="color: #000000;">\"</span> + cBrush<br />ENDIF<br />IF nStyle = 4<br /> DEFINE IMAGE oImage FILE c_path + "</span>\<span style="color: #0000ff;">Images</span>\<span style="color: #ff0000;">" + cImage<br /> // Get Width and Height from INIT !!!<br /> oBrush := TBrush():new( ,,,, ResizeBmp( oImage:hBitmap, oDlg:nWidth, oDlg:nHeight, .T. ) )<br /> oImage:End()<br />ENDIF<br /><br />oDlg:SetBrush( oBrush )<br />oBrush:End()<br /><br />RETURN( NIL )<br /></span></div>[/code:1csct4au]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Color Folder | E' possibile togliere la striscia bianca del Folder collegrata ai Prompts[img:1nf1lzww]http://img528.imageshack.us/my.php?image=insmovcn6.png[/img:1nf1lzww]Saluti |
Color Folder | [img:nr3qv8dk]http://img528.imageshack.us/img528/6198/insmovcn6.png[/img:nr3qv8dk] |
Color Folder | ciao,ai potrebbe avere una demo di questa tua prima nota....mi sembra graziosa....e se mi piace il costo?????ciao ciao e grazie<!-- e --><a href="mailto:xfood@libero.it">xfood@libero.it</a><!-- e --> |
Color For Listbox | Hi
[code=fw:2w84chvb]<div class="fw" id="{CB}" style="font-family: monospace;"> </div>[/code:2w84chvb]
@ 4, 0.4 LISTBOX oLbx FIELDS art->type, art->reference;
HEADERS "Type", "Ref" ;
FIELDSIZES 10, 65;
SIZE 307, 120 OF oDlg ;
FONT oFont
@ 0.2, 0.4 XBROWSE oBrw ALIAS Alias() OF oChild SIZE 307, 170
[code=fw:2w84chvb]<div class="fw" id="{CB}" style="font-family: monospace;"> </div>[/code:2w84chvb]
For XBROWSE, the top of the box is colored, but for LISTBOX, the top of the box is not colored. How to get a colour for listbox ?
Thanks
ACWoo
Using FWH1201 + bcc582 + Harbour |
Color For Listbox | Do you mean "nColorHeader"?
Dutch |
Color For Listbox | See this code for TWBROWSE 17 by HDC
[code=fw:1xios9zq]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> ::<span style="color: #000000;">nClrBackHead</span> := GetSysColor<span style="color: #000000;">(</span> COLOR_BTNFACE <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">nClrForeHead</span> := GetSysColor<span style="color: #000000;">(</span> COLOR_BTNTEXT <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">nClrBackFocus</span> := GetSysColor<span style="color: #000000;">(</span> COLOR_HIGHLIGHT <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">nClrForeFocus</span> := GetSysColor<span style="color: #000000;">(</span> COLOR_HIGHLIGHTTEXT<span style="color: #000000;">)</span> <span style="color: #B900B9;">// CeSoTech CLR_WHITE</span><br /><br /><br /> ::<span style="color: #000000;">nClrFBack</span> := ::<span style="color: #000000;">nClrBackHead</span> <span style="color: #B900B9;">// by CeSoTech</span><br /> ::<span style="color: #000000;">nClrFFore</span> := ::<span style="color: #000000;">nClrForeHead</span> <span style="color: #B900B9;">// by CeSoTech</span><br /><br /> ::<span style="color: #000000;">nClrNFBack</span> := GetSysColor<span style="color: #000000;">(</span> COLOR_HIGHLIGHT <span style="color: #000000;">)</span> <span style="color: #B900B9;">// COLOR_BTNSHADOW ) // by CeSoTech</span><br /> ::<span style="color: #000000;">nClrNFFore</span> := ::<span style="color: #000000;">nClrForeFocus</span> <span style="color: #B900B9;">// by CeSoTech</span><br /><br /> </div>[/code:1xios9zq] |
Color For Listbox | [code=fw:2tffld4b]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> BRW_HEADER nRGB<span style="color: #000000;">(</span><span style="color: #000000;">192</span>,<span style="color: #000000;">220</span>,<span style="color: #000000;">255</span><span style="color: #000000;">)</span><br /><br /> oTbw:<span style="color: #000000;">bBkColor</span> := <span style="color: #000000;">{</span>|nRow,nCol,nStyleLine| <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>nStyleLine=<span style="color: #000000;">0</span>, nBckGrd<span style="color: #000000;">(</span>oTbw<span style="color: #000000;">)</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>nStyleLine=<span style="color: #000000;">3</span> , nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, BRW_HEADER <span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br />.....<br /><br />*--------------------*<br /><span style="color: #00C800;">Function</span> nBckGrd<span style="color: #000000;">(</span>oBrw<span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> iif<span style="color: #000000;">(</span>iif<span style="color: #000000;">(</span>!empty<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">cAlias</span><span style="color: #000000;">)</span>,<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">cAlias</span><span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>OrdKeyNo<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> %<span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>,nRGB<span style="color: #000000;">(</span><span style="color: #000000;">240</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span><span style="color: #000000;">220</span>,<span style="color: #000000;">235</span>,<span style="color: #000000;">255</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> </div>[/code:2tffld4b]
Do you try this? |
Color For Listbox | Thanks For Your Help
::nClrBackHead := GetSysColor( COLOR_BTNFACE )
::nClrForeHead := GetSysColor( COLOR_BTNTEXT )
::nClrBackFocus := GetSysColor( COLOR_HIGHLIGHT )
::nClrForeFocus := GetSysColor( COLOR_HIGHLIGHTTEXT) // CeSoTech CLR_WHITE
::nClrFBack := ::nClrBackHead // by CeSoTech
::nClrFFore := ::nClrForeHead // by CeSoTech
::nClrNFBack := GetSysColor( COLOR_HIGHLIGHT ) // COLOR_BTNSHADOW ) // by CeSoTech
::nClrNFFore := ::nClrForeFocus // by CeSoTech
Where do I put the above for oLbx ?
oTbw:bBkColor := {|nRow,nCol,nStyleLine| if(nStyleLine=0, nBckGrd(oTbw), if(nStyleLine=3 , nRGB( 64, 64, 255 ), BRW_HEADER )) }
I tried to change Tbw/Brw to Lbx, but it does not work for oLbx.
Regards
ACWoo
Using Fwh2101+bcc582+Harbour |
Color For Listbox | See this example:
[code=fw:1xzluyul]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />..<br />.<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oLbx ;<br /> FIELDS MyCampo<span style="color: #000000;">(</span>oCtasCTes, <span style="color: #ff0000;">"tipo"</span><span style="color: #000000;">)</span>, ;<br /> MyCampo<span style="color: #000000;">(</span>oCtasCTes, <span style="color: #ff0000;">"documento"</span><span style="color: #000000;">)</span>, ;<br /> SetFecha<span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCTes, <span style="color: #ff0000;">"fecha_doc"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"moneda"</span><span style="color: #000000;">)</span>=<span style="color: #ff0000;">"S"</span>,STR<span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCTes,<span style="color: #ff0000;">"monto"</span><span style="color: #000000;">)</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span>,STR<span style="color: #000000;">(</span><span style="color: #000000;">0</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"moneda"</span><span style="color: #000000;">)</span>=<span style="color: #ff0000;">"S"</span>,STR<span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCTes,<span style="color: #ff0000;">"saldo"</span><span style="color: #000000;">)</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span>,STR<span style="color: #000000;">(</span><span style="color: #000000;">0</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"moneda"</span><span style="color: #000000;">)</span>=<span style="color: #ff0000;">"D"</span>,STR<span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCTes,<span style="color: #ff0000;">"monto"</span><span style="color: #000000;">)</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span>,STR<span style="color: #000000;">(</span><span style="color: #000000;">0</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"moneda"</span><span style="color: #000000;">)</span>=<span style="color: #ff0000;">"D"</span>,STR<span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCTes,<span style="color: #ff0000;">"saldo"</span><span style="color: #000000;">)</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span>,STR<span style="color: #000000;">(</span><span style="color: #000000;">0</span>,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, ;<br /> SetFecha<span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCTes, <span style="color: #ff0000;">"vencimiento"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, ;<br /> DiasMora<span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"vencimiento"</span><span style="color: #000000;">)</span>, MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"saldo"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCtes,<span style="color: #ff0000;">"estado"</span><span style="color: #000000;">)</span>=<span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"ANULADO"</span>,<span style="color: #ff0000;">""</span><span style="color: #000000;">)</span> ;<br /> HEADERS <span style="color: #ff0000;">"Tipo"</span>, ;<br /> <span style="color: #ff0000;">"Documento"</span>, ;<br /> <span style="color: #ff0000;">"Fecha"</span> , ;<br /> <span style="color: #ff0000;">"Monto S/."</span>, ;<br /> <span style="color: #ff0000;">"Saldo S/."</span>, ;<br /> <span style="color: #ff0000;">"Monto U$."</span>, ;<br /> <span style="color: #ff0000;">"Saldo U$."</span>, ;<br /> <span style="color: #ff0000;">"Vencimiento"</span>, ; <span style="color: #B900B9;">//</span><br /> <span style="color: #ff0000;">"Mora"</span>, ;<br /> <span style="color: #ff0000;">"Estado"</span>; <span style="color: #B900B9;">// UltReg(oCtasCtes, oLbx),</span><br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span>EVAL<span style="color: #000000;">(</span>eDatP<span style="color: #000000;">)</span>, oDat<span style="color: #000000;">[</span><span style="color: #000000;">6</span><span style="color: #000000;">]</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">FONT</span> oFont3 ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, oApp:<span style="color: #000000;">nRowParClr</span> ;<br /> SIZES <span style="color: #000000;">30</span>, <span style="color: #000000;">155</span>, <span style="color: #000000;">105</span>, <span style="color: #000000;">115</span>, <span style="color: #000000;">115</span>, <span style="color: #000000;">115</span>, <span style="color: #000000;">115</span>, <span style="color: #000000;">115</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span> ; <span style="color: #B900B9;">// IF(nModo=1,"C","V")</span><br /> <span style="color: #0000ff;">ON</span> DBLCLICK <span style="color: #000000;">(</span>VerDocumento<span style="color: #000000;">(</span>oMySQL , MyCampo<span style="color: #000000;">(</span>oCtasCtes,<span style="color: #ff0000;">"estado"</span><span style="color: #000000;">)</span>, MyCampo<span style="color: #000000;">(</span>oCtasCtes,<span style="color: #ff0000;">"modo"</span><span style="color: #000000;">)</span>, MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"fecha_doc"</span><span style="color: #000000;">)</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">(</span>EMPTY<span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"tipo"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #ff0000;">"09"</span>,MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"tipo"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"documento"</span><span style="color: #000000;">)</span>, MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"documento"</span><span style="color: #000000;">)</span>,MyCampo<span style="color: #000000;">(</span>oCtasCtes, <span style="color: #ff0000;">"fecha_doc"</span><span style="color: #000000;">)</span>, MyCampo<span style="color: #000000;">(</span>oCtasCtes ,<span style="color: #ff0000;">"ruc_dni"</span><span style="color: #000000;">)</span>, nModo<span style="color: #000000;">)</span>, oLbx:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">151</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> MySetBrowse<span style="color: #000000;">(</span>oLbx,oCtasCTes<span style="color: #000000;">)</span><br /> oLbx:<span style="color: #000000;">aJustify</span> := <span style="color: #000000;">{</span>.f.,.f.,.f.,.t.,.t.,.t.,.t.,.f.,.f.,.f.<span style="color: #000000;">}</span><br /> oLbx:<span style="color: #000000;">nFreeze</span> := <span style="color: #000000;">10</span><br /><br /> oLbx:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">{</span>|nKey|If<span style="color: #000000;">(</span>nKey = <span style="color: #000000;">46</span>, EliminaCtaTotal<span style="color: #000000;">(</span>oMySQL , MyCampo<span style="color: #000000;">(</span>oCtasCTes, <span style="color: #000000;">4</span><span style="color: #000000;">)</span>, MyCampo<span style="color: #000000;">(</span>oCtasCTes, <span style="color: #000000;">5</span><span style="color: #000000;">)</span>, cDat<span style="color: #000000;">[</span> <span style="color: #000000;">3</span><span style="color: #000000;">]</span>, nModo, MyCampo<span style="color: #000000;">(</span>oCtasCTes,<span style="color: #ff0000;">"monto"</span><span style="color: #000000;">)</span>, MyCampo<span style="color: #000000;">(</span>oCtasCTes,<span style="color: #ff0000;">"saldo"</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>,<span style="color: #000000;">)</span>, EVAL<span style="color: #000000;">(</span>eDatCC<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oLbx:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">{</span>|nRow, nCol|oLbx:<span style="color: #000000;">lButtonDown</span><span style="color: #000000;">(</span>nRow,nCol<span style="color: #000000;">)</span>, AnularCtaCte<span style="color: #000000;">(</span>oMySQL , oDlg, cDat, oCtasCtes, oCtasPago, nModo, nRow, nCol<span style="color: #000000;">)</span>, EVAL<span style="color: #000000;">(</span>eDatCC<span style="color: #000000;">)</span>, EVAL<span style="color: #000000;">(</span>eDatP<span style="color: #000000;">)</span>, oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oLbx:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oLbx:<span style="color: #000000;">nClrBackFocus</span> := oApp:<span style="color: #000000;">cColor2</span><br /> oLbx:<span style="color: #000000;">nClrForeFocus</span> := <span style="color: #000000;">{</span> ||If<span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCtes,<span style="color: #ff0000;">"estado"</span><span style="color: #000000;">)</span> = <span style="color: #ff0000;">"A"</span>,CLR_HGRAY,<span style="color: #00C800;">If</span><span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCTes,<span style="color: #ff0000;">"saldo"</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span>, oApp:<span style="color: #000000;">HRojo</span>, oApp:<span style="color: #000000;">HAzul</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span><br /> oLbx:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">{</span> ||If<span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCtes,<span style="color: #ff0000;">"estado"</span><span style="color: #000000;">)</span> = <span style="color: #ff0000;">"A"</span>,CLR_HGRAY,<span style="color: #00C800;">If</span><span style="color: #000000;">(</span>MyCampo<span style="color: #000000;">(</span>oCtasCTes,<span style="color: #ff0000;">"saldo"</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span>, oApp:<span style="color: #000000;">HRojo</span>, oApp:<span style="color: #000000;">HAzul</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span><br /> oLbx:<span style="color: #000000;">nClrPane</span> := <span style="color: #000000;">{</span> ||IF<span style="color: #000000;">(</span>oCtasCTes:<span style="color: #000000;">Recno</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>,<span style="color: #000000;">(</span>oApp:<span style="color: #000000;">nRowParClr</span><span style="color: #000000;">)</span>,<span style="color: #000000;">(</span>oApp:<span style="color: #000000;">nRowNonClr</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oLbx:<span style="color: #000000;">nStyle</span> := nOr<span style="color: #000000;">(</span> WS_CHILD, WS_HSCROLL, WS_VSCROLL, WS_BORDER, WS_VISIBLE, WS_TABSTOP<span style="color: #000000;">)</span><br /> oLbx:<span style="color: #000000;">aFooters</span> := <span style="color: #000000;">{</span>||<span style="color: #000000;">{</span><span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span>, STR<span style="color: #000000;">(</span>nTotalMS,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span>, STR<span style="color: #000000;">(</span>nTotalS,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span> ,STR<span style="color: #000000;">(</span>nTotalMD,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span>, STR<span style="color: #000000;">(</span>nTotalD,<span style="color: #000000;">12</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">"Días"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span><br /> oLbx:<span style="color: #000000;">lDrawFooters</span> :=.T.<br /><br /> </div>[/code:1xzluyul] |
Color For Listbox | [quote="acwoo1":1vqxcfxk]
Where do I put the above for oLbx ?
oTbw:bBkColor := {|nRow,nCol,nStyleLine| if(nStyleLine=0, nBckGrd(oTbw), if(nStyleLine=3 , nRGB( 64, 64, 255 ), BRW_HEADER )) }
I tried to change Tbw/Brw to Lbx, but it does not work for oLbx.
Regards
ACWoo
Using Fwh2101+bcc582+Harbour[/quote:1vqxcfxk]
ACWoo,
You must link TWBrowse.LIB for this ::data. It will be override LISTBOX class and change LISTBOX to TWBrowse in RC (if use). |
Color For Listbox | Thanks For Your Help
The example changes the colour of the content of the listbox.
I was trying just to change the colour of the header in the listbox.
I don't use RC.
Regards
ACWoo
Using FWH1201+bcc582+Harbour |
Color For Listbox | oTbw:bBkColor := {|nRow,nCol,nStyleLine| if(nStyleLine=0, nBckGrd(oTbw), if([color=#FF0000:1oqz6xz5]nStyleLine[/color:1oqz6xz5]=3 , nRGB( 64, 64, 255 ), BRW_HEADER )) }
nStyleLine=3 (Header)
[quote="acwoo1":1oqz6xz5]Thanks For Your Help
The example changes the colour of the content of the listbox.
I was trying just to change the colour of the header in the listbox.
I don't use RC.
Regards
ACWoo
Using FWH1201+bcc582+Harbour[/quote:1oqz6xz5]
May help |
Color For Listbox | Thanks For Your Help
[code=fw:2falqnki]<div class="fw" id="{CB}" style="font-family: monospace;">You must link TWBrowse.LIB <span style="color: #00C800;">for</span> this ::<span style="color: #00C800;">data</span>. It will be override <span style="color: #0000ff;">LISTBOX</span> <span style="color: #00C800;">class</span> and <span style="color: #0000ff;">change</span> <span style="color: #0000ff;">LISTBOX</span> <span style="color: #0000ff;">to</span> TWBrowse in RC <span style="color: #000000;">(</span><span style="color: #00C800;">if</span> use<span style="color: #000000;">)</span>.</div>[/code:2falqnki]
Where do I find TWBrowse.lib ?
Thanks
Regards
ACWoo
Using FWH1201+bcc582+Harbour |
Color For Listbox | ACWoo,
What is your email?
[quote="acwoo1":3qljxboi]Thanks For Your Help
[code=fw:3qljxboi]<div class="fw" id="{CB}" style="font-family: monospace;">You must link TWBrowse.LIB <span style="color: #00C800;">for</span> this ::<span style="color: #00C800;">data</span>. It will be override <span style="color: #0000ff;">LISTBOX</span> <span style="color: #00C800;">class</span> and <span style="color: #0000ff;">change</span> <span style="color: #0000ff;">LISTBOX</span> <span style="color: #0000ff;">to</span> TWBrowse in RC <span style="color: #000000;">(</span><span style="color: #00C800;">if</span> use<span style="color: #000000;">)</span>.</div>[/code:3qljxboi]
Where do I find TWBrowse.lib ?
Thanks
Regards
ACWoo
Using FWH1201+bcc582+Harbour[/quote:3qljxboi] |
Color For Listbox | Thanks For Your Help
My email: <!-- e --><a href="mailto:eddylou89@yahoo.com">eddylou89@yahoo.com</a><!-- e -->
Regards
ACWoo
Using FWH1201+bcc582+Harbour |
Color For Listbox | Hi Dutch
Thanks very much for your files.
Regards
ACWoo |
Color Menu y Barra de botones 2007 | Hola :
Me podrias indicar si es posible que en vez de azul se pueda poner el color de los menus y las barras de botones y mensajes en verde u otro color.
Un saludo
Carlos |
Color Menu y Barra de botones 2007 | Carlos,
Es muy fácil de hacer, lo que ocurre es que de momento no hemos implementado un parámetro ó DATA para definir el color, por lo que tendrías que modificar algunas classes de FWH |
Color Menu y Barra de botones 2007 | Hola Antonio
Me podrias decir cuales
Gracias. |
Color Menu y Barra de botones 2007 | Carlos,
En la Clase TBar busca la llamada a la función Gradient() y verás que usa unos colores nRGB(..., ..., ...). Usa los que necesites.
Igualmente revisa la Clase TBtnBmp y busca la llamada a Gradient(). |
Color Menu y Barra de botones 2007 | Gracias Antonio:
Lo del barra de botones queda bien con estas dos clases, pero tambien quierto cambiar el color de los menus y de la barra de mensajes, me podrias decir en que classes debo buscar, gracias
Carlos |
Color Menu y Barra de botones 2007 | Carlos,
Para la barra de mensajes necesitas un bitmap y has de cargarlo en el método Paint():
[code:23mx1es1]
if hBmp == nil .and. ::l2007
hBmp = MsgBar2007( ::hDC )
endif
[/code:23mx1es1]
En vez de llamar a MsgBar2007(), llama a LoadBitmap( GetResources(), <cResName> ) en donde <cResName> es el nombre del bitmap en tu fichero de recursos. El bitmap se estirará ajustándose al tamaño de la barra.
En cuanto al menu, de momento no puedes hacerlo. Necesitas que proporcionemos unos parámetros, ya que la función está integramente en C y el código fuente aún no lo hemos proporcionado |
Color Menu y Barra de botones 2007 | Gracias Antonio por la información.
Un saludo
carlos |
Color Menu y Barra de botones 2007 | Antonio que pena molestarte, pero me gustaria saber si ya se puede cambiar el color de los menus con estilo 2007? |
Color Print TGraph Pie 3D | Hi.
The color of the lateral edge of the pie chart is wrong when printed by the print class.
Print: Wrong
[img:3seouu6o]http://www.awsinformatica.com.br/des/GraficoPrint.JPG[/img:3seouu6o]
Dialog: Right
[img:3seouu6o]http://www.awsinformatica.com.br/des/GraficoDlg.JPG[/img:3seouu6o] |
Color Print TGraph Pie 3D | Antonio, could see this problem? |
Color Print TGraph Pie 3D | Did anybody ever fins a solution to this problem ?
We are still trying to resolve it
Thanks
Peter |
Color Scheme Development Utility | Hello All,
Sometime back one gentleman had kind donated a utility to this NG forum, in which various combinations of color can be viewed and stored in a dbf file at the same time. This small utility had wonderful application in experimenting with color combinations for foreground and background.
I use this utilit along with color cop to select color of my application.
Unfortunately I have lost it, can somebody guide me about the author ?
TIA
Milan. |
Color Scheme Development Utility | Milan,
Check your e-mail ... I have sent you the program.
Jeff |
Color Setting for GET READONLY | In the past, when a GET was marked READONLY, a change had been made that allowed the following:
TGet():nClrGrayText := 25
This allowed us to use a different color than grey which could be more readable, and yet differentiated from editable text.
Apparently this capability has been removed since it no longer functions as it once did. Can this be corrected ? |
Color Setting for GET READONLY | Tim,
We are reviewing it
many thanks for your feedback |
Color Setting for GET READONLY | Tim
You can control the color of your Get\Say yourself .. consider this code :
[code=fw:222l5leh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />oFontB := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Ms Sans Serif"</span>,,<span style="color: #000000;">-6</span>,.F.,.T. ,,,,.F. <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay16 <span style="color: #0000ff;">var</span> cSay16 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">147</span> <span style="color: #0000ff;">of</span> oEmpl <span style="color: #0000ff;">UPDATE</span> <br /> oSay16:<span style="color: #000000;">SetFont</span><span style="color: #000000;">(</span> oFontB <span style="color: #000000;">)</span><br /> oSay16:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span>nRgb<span style="color: #000000;">(</span><span style="color: #000000;">7</span>,<span style="color: #000000;">7</span>,<span style="color: #000000;">224</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// blue</span><br /><br /><br /><span style="color: #B900B9;">// disabled</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oUserid <span style="color: #0000ff;">var</span> cUserid <span style="color: #0000ff;">ID</span> <span style="color: #000000;">126</span> <span style="color: #0000ff;">of</span> oEmpl <span style="color: #0000ff;">COLOR</span> CLR_BLACK, <span style="color: #000000;">15987697</span> READONLY<br /><br /> </div>[/code:222l5leh]
Rick Lipkin |
Color Setting for GET READONLY | Rick,
Of course we can, but a few versions back, Nages made a modification so we could actually set a get value in one spot to be applied universally. That change disappeared.
Here is why it was important. Some of my clients ( many actually ) complained that the grey used for READONLY fields was too hard to read in well lit settings. That setting is normally drawn from the Windows color scheme, and uses the system setting for COLOR_GRAYTEXT.
Now, the get is changed to a default color of 17 in the current (17.12) version source code.
Rather than go and add code to every GET that uses a READONLY value, that capability was a real benefit. I'm not sure why it went away.
Tim |
Color Setting for GET READONLY | Tim
Put this at the top of your program .. I use it in all my applications .. see if it helps.
Rick Lipkin
[code=fw:c5ih1c6s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//fix for readonly gets</span><br />TGet<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">lDisColors</span> := .f.<br /> </div>[/code:c5ih1c6s] |
Color Setting for GET READONLY | The CLASSDATA nClrGrayText was first provided in FWH1512. Extract from whatsnew.txt:
[quote:2wi3j5ov]
* Enhancement: Class TGet COLOR_GRAYTEXT constant use changed into a CLASSDATA
::nClrGrayText as per Tim Stone requirement
[/quote:2wi3j5ov]
[b:2wi3j5ov]We verified once again and did not find any change in the behavior since FWH1512 till now.[/b:2wi3j5ov]
You assigned a value of 25 to TGet():nClrGrayText. GetSysColor(25) returns 0, i.e., CLR_BLACK which is the same as text color of normal Get. So, both disabled and normal Gets are displayed with the same colors, i.e., COLOR_BLACK/COLOR_WHITE. That must be the reason you did not notice the difference in the colors of disabled and normal Gets.
We can see the difference by assigning a different color, such as 16 (COLOR_BUTTONSHADOW).
Test program:
[code=fw:2wi3j5ov]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><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;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oFont, aGet<span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">local</span> aVar := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"One "</span>, <span style="color: #ff0000;">"Two "</span>, <span style="color: #ff0000;">"Three "</span>, <span style="color: #ff0000;">"Four "</span> <span style="color: #000000;">}</span><br /><br /> SetGetColorFocus<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> TGet<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">nClrGrayText</span> := <span style="color: #000000;">16</span> <span style="color: #B900B9;">// COLOR_BTNSHADOW</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <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 /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont<br /><br /> @ <span style="color: #000000;">20</span>,<span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> aVar<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">26</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /> @ <span style="color: #000000;">55</span>,<span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> aVar<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">26</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg READONLY<br /> @ <span style="color: #000000;">90</span>,<span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> aVar<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">26</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">WHEN</span> .F.<br /> @ <span style="color: #000000;">125</span>,<span style="color: #000000;">50</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> aVar<span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">26</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2wi3j5ov]
[url=https://imageshack.com/i/pnmbZaFyp:2wi3j5ov][img:2wi3j5ov]https://imagizer.imageshack.com/v2/xq90/923/mbZaFy.png[/img:2wi3j5ov][/url:2wi3j5ov]
The behaviour is exactly the same with every version of FWH from 1512 till now. |
Color Setting for GET READONLY | I discovered late yesterday that it does still work. However, I was trying to use the old color equivalents from the Clipper / xHarbour values. Thus the colors I originally entered were all showing up black. For example, 1 was blue, but it shows as black.
After realizing that the include is wcolors.ch I scanned those values and was able to find a value that actually would display in a workable color. When 10 fields are displayed, but 8 are readonly, having all of them in black doesn't work well when a client needs to know which field they can edit.
I have it under control now. Originally having it at black on other screens was fine ( and easier to read than grey ), but now that I needed two separate colors, my values were just not registering changes. All is OK now.
Tim |
Color TButton | Hola,
En FWH si se puede, pero en FWppc no sé como se podría cambiar en una TButton el color del texto, e incluso el del fondo. |
Color TButton | Joaquín,
Lo suyo es usar un control TBtnBmp que nos permite todas esas posibilidades |
Color a Get desHabilitados en Harbour | Buen Dia para todos
Desearia cambiar el color de los GETs que se encuentran DESHABILITADOS (Ejem. WHEN .f.) en Harbour, de preferencia quizas hacerlo globalmente cambiando el la Clase TGEts
Les comentare que algo asi hice para cambiar en todo el sistema el Color del Get que tiene el Foco de edicion por ejemplo a amarillo, asi el usuario sabe donde digita... pues ahora deseo que vea de otro color el Get Deshabilitado
Harbour + FWH2.5 + BCC55
Gracias
Lubin |
Color a Get desHabilitados en Harbour | Si quieres enviame un correo al privado y te hago llegar la clase modificada.. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.