1. Patrick Fabian
  2. PowerBuilder
  3. Thursday, 13 February 2020 10:31 AM UTC

Hello Appeon Community,

I have a problem with a rte window in PowerBuilder 2019.

I'm using the command "SetTextStyle" in order to create a custom button to reset all the text style changes (bold, italic, underline, etc) to the text in the control.

The curious thing is, it only sets the text style in general for the bold command.

 

The code of the button goes like this:

rte_1.SelectTextAll()
rte_1.SetTextStyle(false, false, false, false, false, false)

The results are like this:

 

Input Output
This is a sample text. This is a sample text.
This is a sample text. This is a sample text.
This is a sample text. This is a sample text.

 

Basically speaking, it only sets the "bold" part of the Textstyle. I tried all the other options, changed the boolean values, the only part working for me is "bold". How can that be? Am I wrong somewhere?

Is there another way to directly change the TextStyle of some text? Is there some variable I can manipulate?

 

Thank you for your time

P. Fabian

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 13 February 2020 15:42 PM UTC
  2. PowerBuilder
  3. # 1

Hi Patrick,

Which RTE are you using?  PowerBuilder 2019 provides two: TE Edit or TX TextControl.

It is true that TE Edit has been buggy, and that the third-party vendor that makes TE Edit has not been responsive in addressing bugs in their product.

However, the situation with TX TextControl is different.  We have good relationship with the third-party vendor that makes TX TextControl, and we are working to bring a newer version of this control in PowerBuilder 2019 R3.  The newer version will have more bug fixes, more features, and support 64-bit.

So in case you are not using TX TextControl, please try that in PowerBuilder 2019.  And if you can still reproduce the issue on TX TextControl, then please open a support ticket.

Regards,

Armeen Mazda
CEO, Appeon

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 14 February 2020 16:04 PM UTC
You can switch the control in the application object's "Additional Properties" window. https://docs.appeon.com/appeon_online_help/pb2019/pbug/ch04s04.html#Specifying_a_rich_text_editor
  1. Helpful
  1. Patrick Fabian
  2. Monday, 17 February 2020 08:38 AM UTC
Apparantly we've been using the Built-in TX Text Control the whole time and not the Built-in Rich Edit Control. So that didn't help.

I even tried the Built-in Rich Edit Control, which has no support, and it works even less. Our purchased spell check from WinterTree-Software doesn't even work there.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Monday, 17 February 2020 16:54 PM UTC
Since you are using the built-in TX Text Control, please open support ticket with whatever you need to provide so we can reproduce it.
  1. Helpful
There are no comments made yet.
Patrick Fabian Accepted Answer Pending Moderation
  1. Thursday, 13 February 2020 11:26 AM UTC
  2. PowerBuilder
  3. # 2

Considering the way our program is working, it would cause serious performance issues in the long run.

I was hoping there was in the RTE some PB variable, similar to the likes of "selectedstartpos", which you could manipulate to see results. Otherwise I'd rather wait until the next PB version is released.

Comment
  1. Miguel Leeuwe
  2. Thursday, 13 February 2020 11:49 AM UTC
A part from bug fixes, I don't think you'd easily get any enhancements on the RTE, as it's a third party control and so far has not been very high on the priority list of Appeon. Just trying to avoid you waiting for something that won't come.
  1. Helpful
  1. Patrick Fabian
  2. Thursday, 13 February 2020 11:57 AM UTC
The problem is, that the PB commands don't work. How can that be?
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 13 February 2020 13:06 PM UTC
Because they are bugs which haven't been fixed.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 13 February 2020 10:48 AM UTC
  2. PowerBuilder
  3. # 3

I would not be surprised if this is a bug and that it's not fixed.

See also https://www.appeon.com/standardsupport/search/view?id=246

There's a workaround:

- manually create some text like "abc" with the style you want, by using the buttons on the rte.

- get the richtext string that it has generated after applying those styles.

- when you want to apply that style in your current rte text, insert that rtf formatted string in your control.

Comment
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.