|
Page 1 of 2
|
No Existe Propiedad Background En Textedit!!!
Author |
Message |
v3ctor
Analista Programador
Joined: May 2013
Posts: 1786
Age: 44 Location: Uruguay
|
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
|
#1 Friday, 29 November 2019, 17:40 |
|
|
vuott
Analista Programador
Joined: August 2013
Posts: 2086
Age: 60 Location:
|
Re: No Existe Propiedad Background En Textedit!!!
v3ctor escribió: ... si exportamos a un documento el richtext ...
De que manera ?
|
#2 Saturday, 30 November 2019, 00:52 |
|
|
v3ctor
Analista Programador
Joined: May 2013
Posts: 1786
Age: 44 Location: Uruguay
|
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/
|
#3 Saturday, 30 November 2019, 23:50 |
|
|
vuott
Analista Programador
Joined: August 2013
Posts: 2086
Age: 60 Location:
|
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
|
#4 Sunday, 01 December 2019, 01:43 |
|
|
v3ctor
Analista Programador
Joined: May 2013
Posts: 1786
Age: 44 Location: Uruguay
|
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/
|
#5 Sunday, 01 December 2019, 04:46 |
|
|
v3ctor
Analista Programador
Joined: May 2013
Posts: 1786
Age: 44 Location: Uruguay
|
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
|
#6 Sunday, 01 December 2019, 04:50 |
|
|
vuott
Analista Programador
Joined: August 2013
Posts: 2086
Age: 60 Location:
|
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) ?
|
#7 Sunday, 01 December 2019, 16:11 |
|
|
v3ctor
Analista Programador
Joined: May 2013
Posts: 1786
Age: 44 Location: Uruguay
|
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
|
#8 Monday, 02 December 2019, 01:01 |
|
|
vuott
Analista Programador
Joined: August 2013
Posts: 2086
Age: 60 Location:
|
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
|
#9 Monday, 02 December 2019, 01:07 |
|
|
v3ctor
Analista Programador
Joined: May 2013
Posts: 1786
Age: 44 Location: Uruguay
|
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
|
#10 Monday, 02 December 2019, 01:31 |
|
|
|
Similar Topics
Similar Topics
|
Page 1 of 2
|
Users browsing this topic: 0 Registered, 0 Hidden and 1 Guest Registered Users: None
|
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
|
|
|
|
|