1. Aron Cox
  2. PowerBuilder
  3. Tuesday, 2 March 2021 18:28 PM UTC

PB219 R3 Build 2670

Project properties set to "Built-in TX Text Control ActiveX 28.0"

32-Bit Application

Believe it or not, I've never had to use a rich text control in PowerBuilder over all these years as a developer. But now someone want to design a pretty signature for the emails we're sending and I thought the new rich text editor looked like it could come in handy.

So I set the project properties as above, created a new window and dropped on the RichTextEdit control. Now I have lots of questions.

It seems fairly basic, the menu seems to only allows font changes, alignment, and bullet points. No colours, no insert x or y type of things etc. If I look at the TX Text Control website, it looks like it can do all kinds of clever and amazing things, wow, it's like Microsoft Word.

So I look at the PowerBuilder help, maybe I have to build all the controls myself, but there will be a rich and complex set of functions, properties and events for me me to do that. Nope, doesn't seem like it? Again pretty basic. I mean if I want to see the HMTL representation I have to first save it to a file???

So am I missing something? Is this the way it is or have I somehow got hold of the wrong thing?

Any clues gratefully received!

Oh, and if you were going to design an HMTL email signature editor in a PowerBuilder application, would would you do it?

Thanks!

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 3 March 2021 11:25 AM UTC
  2. PowerBuilder
  3. # 1

Believe it or not, to change font and colours, you can do CTRL+ALT+D, or you can select some text, right mouse click on it and choose 'properties'.

The 28.0 version has a new problem with pasting Images and then exporting (SaveDocument) as html. Depending where you copied the image from, it could generate html with a link to a non existing image. For this same reason I'm still using the v15.0. That one might or might not generate a link to the image, but at least if it does, it won't be an invalid one.

https://www.appeon.com/standardsupport/track/view?id=5954

Since you are still on time, I'd strongly recommend using an html editor instead of the Appeon richtext edit control.

Now that we have improved support with the new webbrowser control, it should be possible to implement editors like Tiny MCE or HTML5 (https://html5-editor.net/).

The TX control has always been "low priority" and it just doesn't stop being full of bugs. I'm sorry I can't be more positive about it, but we've been waiting for years now and it's still not ok, though slowly improving. In windows 3.11 and powerbuilder 6.5.1 it was perfect!

regards

Comment
  1. Aron Cox
  2. Wednesday, 3 March 2021 11:42 AM UTC
Thank you!



I was experimenting last night and his morning and discovered that I had to give the user a button to insert an image rather than pasting in an image, or, as you say, the image does not get embedded.



Right-click does nothing for me, so either I have to code it myself or turn something on, who would've guessed CTRL-ALT-D would popup something useful! i wonder if I can do that in code???



I didn't think at all about the new webbrowser control, that's definitely somethign to look at, thanks.



I have currently implemeted an "Edit in Word" button saves the current rich text as a Word document, opens it in Word, allows the user to edit it, and then puts it back in the Rich Text control after the user is done, and that seems to work pretty well.



Bit worried about the bugs, but hoping that won't matter as the user shouldn't be doing anything too complicated, I hope.
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 3 March 2021 11:59 AM UTC
it depends where you copied the image from. You get different results when copying from for example Paint.exe or the windows 10 snipping tool.

If right click doesn't do anything you have to look at the properties of the control. There's one that enables the contextual menu for the richtext.

I'm not sure if the "Send()" command would work to generate the Ctrl+alt+D keypress. I've found that the send() doesn't always work (anymore) for certain things it does and others it doesn't. (when trying to run old examples of the use of Send() ).

I think the Word solution is probably a good one, though you oblige your users to have office installed.

regards
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.