Home    Forum    Search    FAQ    Register    Log in


Post new topic  Reply to topic 
Page 1 of 2
Goto page 1, 2  Next
 
No Existe Propiedad Background En Textedit!!!
Author Message
Quote   Download Post  
Post No Existe Propiedad Background En Textedit!!! 
 
buenas, como saben estoy trabajando mucho con la clase textedit va conociéndola mas internamente.

ya he dicho que la función foreground del textedit a mi entender no funciona!!
pues ahora me di cuenta que la funcion background es falsa, pues no actua sobre el documento html sino sobre el fondo de la clase textedit, si le asignamos background al textedit vemos como cambia de fondo pero si exportamos a un documento el richtext vemos que el fondo no se ha modificado y si observamos el richtext en vivo nos damos cuenta que no se modifica jamas el richtext con respecto al fondo.

esta clase tiene varios defectos a corregir!! que piensan ustedes???
 




===================
Software libre, programación libre, vida libre es la Public function Libertad()as Invendible :mad:
Proyectos: VisorRV1960,Taller2015,Tanteador
https://sourceforge.net/u/v3ctor-full/profile/
Blog: http://novatocodegambas.blogspot.com.uy/
 
Last edited by v3ctor on Friday, 29 November 2019, 17:40; edited 1 time in total 
v3ctor - ProfilePMWebsite 
Back to topPage bottom
Quote   Download Post  
Post Re: No Existe Propiedad Background En Textedit!!! 
 
v3ctor escribió:  
... si exportamos a un documento el richtext ...

De que manera ?
 



 
vuott - ProfilePM 
Back to topPage bottom
Quote   Download Post  
Post Re: No Existe Propiedad Background En Textedit!!! 
 
vuott escribió:  
v3ctor escribió:  
... si exportamos a un documento el richtext ...

De que manera ?


file.save&/"prueba.html", textedit.richtext
 




===================
Software libre, programación libre, vida libre es la Public function Libertad()as Invendible :mad:
Proyectos: VisorRV1960,Taller2015,Tanteador
https://sourceforge.net/u/v3ctor-full/profile/
Blog: http://novatocodegambas.blogspot.com.uy/
 
v3ctor - ProfilePMWebsite 
Back to topPage bottom
Quote   Download Post  
Post Re: No Existe Propiedad Background En Textedit!!! 
 
Prueba este codigo (usar libreria grafica QT4 o QT5):

Public Sub Form_Open()
  
' Colorea el fondo del "TextEdit" en amarillo:
  TextEdit1.RichText = "<BODY BGColor=\"#FFFF00\">"

End


' Después de escribir en el "Textedit", hacer clic en este botón:
Public Sub Button1_Click()

  File.Save("/tmp/prueba.html", TextEdit1.RichText)

End


...en fin abrir manualmente el archivo prueba.html.
 



 
Last edited by vuott on Sunday, 01 December 2019, 01:50; edited 1 time in total 
vuott - ProfilePM 
Back to topPage bottom
Quote   Download Post  
Post Re: No Existe Propiedad Background En Textedit!!! 
 
vuott escribió:  
Prueba este codigo (usar libreria grafica QT4 o QT5):

Public Sub Form_Open()
  
' Colorea el fondo del "TextEdit" en amarillo:
  TextEdit1.RichText = "<BODY>"

End


' Después de escribir en el "Textedit", hacer clic en este botón:
Public Sub Button1_Click()

  File.Save("/tmp/prueba.html", TextEdit1.RichText)

End


...en fin abrir manualmente el archivo prueba.html.


si es la solución que estaba pensando hay tres formas de ingresar el color yo voy a usar rgb pues esos tres números ya lo tiene la clase que hice namecolor, la cual tiene el nombre del color y sus rgb. de todas maneras es algo a revisar por el creador de la clase textedit.


COLOR DE FONDO

<body>
</body>

<body>
</body>

<body>
</body>

AQUA:0,255,255
AQUAMARINE:127,255,212
AZURE:240,255,255
BEIGE:245,245,220
BISQUE:255,228,196
BLACK:0,0,0
CADETBLUE:95,158,160 etc...
 




===================
Software libre, programación libre, vida libre es la Public function Libertad()as Invendible :mad:
Proyectos: VisorRV1960,Taller2015,Tanteador
https://sourceforge.net/u/v3ctor-full/profile/
Blog: http://novatocodegambas.blogspot.com.uy/
 
v3ctor - ProfilePMWebsite 
Back to topPage bottom
Quote   Download Post  
Post Re: No Existe Propiedad Background En Textedit!!! 
 
vuott, el body ya esta en el richtext, hay que ver como remplazar o agregar el "gbcolor=rgb(34,35,66);" o algo por el estilo ya que la idea es que el documento se vea igual que en el programa visorrv1960.
 




===================
Software libre, programación libre, vida libre es la Public function Libertad()as Invendible :mad:
Proyectos: VisorRV1960,Taller2015,Tanteador
https://sourceforge.net/u/v3ctor-full/profile/
Blog: http://novatocodegambas.blogspot.com.uy/
 
Last edited by v3ctor on Monday, 02 December 2019, 02:01; edited 1 time in total 
v3ctor - ProfilePMWebsite 
Back to topPage bottom
Quote   Download Post  
Post Re: No Existe Propiedad Background En Textedit!!! 
 
v3ctor escribió:  
vuott, el body ya esta en el richtext

Eh... prueba solo usando <gbcolor=....>.  



v3ctor escribió:  
hay que ver como remplazar o agregar el "gbcolor=rgb(34,35,66);"


¿Cuál es la diferencia entre FF0000 y ....rgb(255,0,0) ?
 



 
vuott - ProfilePM 
Back to topPage bottom
Quote   Download Post  
Post Re: No Existe Propiedad Background En Textedit!!! 
 
ahora que veo tengo que usar bgcolor y un numero hexadecimal pero el selector de color me tira un integer,

tendré que convertirlo a hexadecimal uf no recuerdo como se hace!!!


Print txtEcapitulo1.Background
  Print "hexa=" & Hex(txtEcapitulo1.Background)
  Print "linea final:" & "<body bgcolor=#" & Hex(txtEcapitulo1.Background)

 




===================
Software libre, programación libre, vida libre es la Public function Libertad()as Invendible :mad:
Proyectos: VisorRV1960,Taller2015,Tanteador
https://sourceforge.net/u/v3ctor-full/profile/
Blog: http://novatocodegambas.blogspot.com.uy/
 
Last edited by v3ctor on Monday, 02 December 2019, 01:09; edited 1 time in total 
v3ctor - ProfilePMWebsite 
Back to topPage bottom
Quote   Download Post  
Post Re: No Existe Propiedad Background En Textedit!!! 
 
v3ctor escribió:  
tendré que convertirlo a hexadecimal uf no recuerdo como se hace!!!


Mira aquì:

   https://www.gambas-it.org/wiki/inde..._ad_Esadecimale
 



 
vuott - ProfilePM 
Back to topPage bottom
Quote   Download Post  
Post Re: No Existe Propiedad Background En Textedit!!! 
 
NuevoRichText = Replace(txtEcapitulo1.RichText, "<body ", "<body gbcolor=\"#" & Hex(txtEcapitulo1.Background) & "\" ")


con esa linea funciona en el textedit pero no asi en el navegador

puede ser que los navegadores no soporten un sin números de colores ??

voy a probar con colores clásicos a ver.
 




===================
Software libre, programación libre, vida libre es la Public function Libertad()as Invendible :mad:
Proyectos: VisorRV1960,Taller2015,Tanteador
https://sourceforge.net/u/v3ctor-full/profile/
Blog: http://novatocodegambas.blogspot.com.uy/
 
Last edited by v3ctor on Monday, 02 December 2019, 01:32; edited 1 time in total 
v3ctor - ProfilePMWebsite 
Back to topPage bottom
Display posts from previous:    
 
HideSimilar Topics
Topic Author Forum Replies Last Post
No new posts El Tab Del Textedit pittusa Controles/Librerías/Componentes 4 Thursday, 29 July 2010, 14:43 View latest post
pittusa
No new posts ¿ Cómo Colocar Un Background De Gradient... Shell General 5 Monday, 21 July 2014, 01:01 View latest post
vuott
No new posts ¿ Existe Una Propiedad Como "index&q... Shell General 6 Sunday, 23 September 2018, 13:12 View latest post
shordi
No new posts Background En Textbox Con Transparencia calcena General 1 Monday, 08 June 2020, 21:22 View latest post
gambafeliz
 

Post new topic  Reply to topic  Page 1 of 2
Goto page 1, 2  Next

Users browsing this topic: 0 Registered, 0 Hidden and 1 Guest
Registered Users: None


 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events



  

 

cron