Rich text editor

Post

Posted
Rating:
#1 (In Topic #344)
Regular
seany is in the usergroup ‘Regular’
Hi

Does gambas 3.14.1 pi has any way to render Rich Text?

I know that i can make it HTML and use a webview. But I want to have a text box with editable lines, where i can individually set the color/style of each character

I am trying to use gb.qt5.ext.textedit. But I can't find any information on this :( please help.
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
Hi seany and welcome to the forum.

Here is a small program I have put together that might help. If it's not what you are looking for can you please provide a little more detail as to the purpose of your program.

Attachment
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Regular
cage is in the usergroup ‘Regular’
 Unfortunately that text program no longer works with the latest version of Gambas 3.14.2.  The property RichText no longer exists in the TextEditor(Use to be called TextEdit).  Not even sure how to get the syntax Highlight to work with the new version since there as far as I can see no switch to turn on the highlighting.  I may be missing something but am still investigating it. There is a property to set it to HTML or WebPage but still no highlighting.
Online now: No Back to the top

Post

Posted
Rating:
#4
Regular
seany is in the usergroup ‘Regular’
Hello
this is failing with "component not found gb.qt4". I have enabled it in project properties:
<IMG src="https://i.imgur.com/xIcMYS2.png"> </IMG>

I am in qt5. So, I wonder what to do now?
Online now: No Back to the top

Post

Posted
Rating:
#5
Avatar
Guru
cogier is in the usergroup ‘Guru’
I have tested the program with qt5 and it works OK.

Let us know if this works for you.

<IMG src="http://www.cogier.com/gambas/Project%20properties.png"> </IMG>
Online now: No Back to the top

Post

Posted
Rating:
#6
Regular
seany is in the usergroup ‘Regular’
Hi
Thank you
This happened after deselecting qt4 and selecting qt5:

<IMG src="https://i.imgur.com/vitw4St.png"> </IMG>

Thank you.
Online now: No Back to the top

Post

Posted
Rating:
#7
Avatar
Regular
cage is in the usergroup ‘Regular’
 seany I had the same problem, but that is because part of the QT4 stuff has been locked.  What I did was create a new program and copy and paste the code.  Still as I said above the program no longer works.
Online now: No Back to the top

Post

Posted
Rating:
#8
Avatar
Guru
cogier is in the usergroup ‘Guru’
OK I have had another go with this. This version here uses a TextLabel but it only works with 'qt' and, for whatever reason, not with 'gtk'.
I am not sure that this is exactly what you were looking for as you have to edit in a different area, but I hope it helps :D

The commands you can use are shown here.

Attachment

<IMG src="http://www.cogier.com/gambas/RichText.png"> </IMG>
Online now: No Back to the top
1 guest and 0 members have just viewed this.