[Gambas-user] Question about TextEdit

Gianluigi bagonergi at gmail.com
Sat Jul 3 14:05:25 CEST 2021


Il giorno sab 3 lug 2021 alle ore 13:51 bb <adamnt42 at gmail.com> ha scritto:

> On Sat, 2021-07-03 at 13:46 +0200, Gianluigi wrote:
>
> Does it display
>         Pippo stà ballando
> or
>         <b>Pippo</b> stà ballando
> ?
> b
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>

With this code:

Public Sub Form_Open()

  TextEdit1.RichText = "<b>Pippo</b> stà ballando"
  '----------------------------------------------
  TextArea1.Text = TextEdit1.Text
  TextArea1.Text &= "\n\n" & String(20, "=") & "\n\n"
  TextArea1.Text &= TextEdit1.RichText

End

you get:

Pippo stà ballando

====================

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "
http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta
http-equiv="Content-Type" content="text/html; charset=utf-8" /><style
type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt;
font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style="
font-weight:600;">Pippo</span> stà ballando</p></body></html>

Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210703/dadaf962/attachment.htm>


More information about the User mailing list