WPCubed Product Support

What is needed before calling WPRichText->SelectAll() ?

Hi

I am trying to upgrade a legacy WPTools 4.5 code in which the following works fine

WPRichText1->Clear();
WPRichText1->AsANSIString('RTF');
WPRichText1->AsString = " This is a Selection Test";
WPRichText1->Refresh();
WPRichText1->SelectAll();
WPRichText1->Font->Size = 20;

The same code runs under WPTools 6.0 but the SelectAll() does not select any text. Hard to compare ver. 4.5 of the WPRichText object vs 6.0 since they are not similar.

It must be something obvious but I am at a loss.

Thanks

RDI : Borland C++ Builder 6
WPTools 6.0
OS : XP

#1 ♥ 0
5.8k Views 2 users read 2 min
support

Hi,

SelectAll should select, but WPRichText1->Font->Size = 20 cannot be used anymore.

Please use

WPRichText1->CurrAttr->Size = 20.0;

Refresh ist not required.

Julian

#2 ♥ 0

Hi,

Using the Sample C++ code WPTools support provided for my earlier WPSpell problem, the WPRichText1->SelectAll() does not select. I have tried te same code on another machine with the same result.

Is there a WPRichText object property I am over looking or shall I post the Text dump of the .dfm in my next e-mail?
As I mention the same code works fine with ver 4.5 of WpTools currently in production in certain sites.

Thanks for the Font heads up, I'll use it as soon as get this select proble resolved.

#3 ♥ 0
support

Hi,

Please check the EditOptions - is selection in general deactivated?

Of course YOu can send your example.

Julian

#4 ♥ 0

Hi,

The change to Edit Option got the SelectAll() going! Won't be so timid with those options next time.

Thanks Julian

#5 ♥ 0
This category is archived. No new posts are possible.