Hi,
I posted this originally as a question in the Programming forum, but the more I work with the RTF field, the more I think that there is some sort of problem here.
I'm providing a small sample solution to demonstrate the kinds of things that I'm seeing. Strangely, tho, while I'm finding issues uniformly with RTF fields, the "roster" of issues changes a bit, while some are constant throughout. In the sample solution.....
1. start the smart client in developer.
2. You'll see that the rtf field is not selected, and the rtf menu bar is not available.
3. Click in the RTF field. You'll see that the rtf menu bar is now available. You'll see that "centered text" is enabled, ie, the button is highlighted.
4. Type in some text. You'll note that even those "centered" is set, the text will left-align instead.
5. Skip a couple of lines, click on the "B" for bold, and type some text.
6. Click outside the field and then click back into it. You'll see that the B for bold is no longer highlighted, but if you type, the text is bold.
7. Now, click on the B, which will highlight the B, indicating that bolding is active. Type some text and you'll see that bolding is actually turned off now.
8. Turn on Bolding, Italics, and underlining.
9. Now click on the color picker and select a color.
10. Click ok in the color picker, closing it. You'll see that some of the text attributes are now turned off, but if you type, you'll find that they are all still active.
Now, in my main solution, I'm also finding that when I use the color picker, and text entered into the field disappears when I return from the color picker.
The goal here is this. In my application, I have a small function that allows the users to generate form letters, proposals, etc. and combine them with headers and footers that they can build in order to make a custom customer contact. The RTF function allows them some control over how the text looks and feels. The data is stored in a text field in the database; with the problems I've run into so far I haven't determined if the text field will retain the RTF settings or not, but remains to be tested.
This obviously isn't how RTF is supposed to work. Have I done something incorrectly here? Are people just not using RTF in Servoy applications? Are they using some alternative? Is there a workaround of some type that retains the menubar settings?
I was able to find one other forum message about a problem with RTF, and that was from 2011 with a comment added that the problem was going to be fixed in Servoy 5.2.9.
As always, any guidance would be greatly appreciated.
Thanks and have a good day.
Ron