|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV SYS-CON.TV WEBCASTS |
POWERBUILDER LINKS YOU MUST CLICK ON PB 10.5 New Rich TextEdit Control for PowerBuilder 10.5
A much-needed improvement
Mar. 17, 2006 08:30 AM
The FindWindowEx function searches for a child of the window represented by the hwndParent handle, beginning after the child window represented by hwndChildAfter, whose class name is lpszClass. The lpszWindow argument can be used to pass in a string with a window title. We won't be using it, so we've declared it as long instead and will be passing 0, which passes a null to the function so that all window titles (or none at all) are matched. I'll also be passing a 0 for the hwndChildAfter to tell the function to start its search with the first child window. For the function that we created on those custom user objects to tell them to spell check the text in the RTE, we pass in an object of type richtextedit (the parent PB control). Within that function, we use the following logic to get the handle of the internal rich edit area:
ulong hWin The last value of hWin is passed in as the parent in the subsequent call because these classes are actually nested within each other. Beyond this point, the way the spell checking is implemented is entirely dependant on which utility we are using. The JRSpell requires a bit of set up in the constructor event to set the language used and the location of the dictionary file (see Listing 1). The VSSpell only requires a reference to the dictionary file: this.object.MainDictFile = "VSSP_AE.DCT" and the WSpell didn't require any setup code at all. For the JRSpell utility, the spell check is initiated through the SpellCheckWithDialog function: this.object.SpellCheckWithDialog ( hWin, 0, 3 ) where the handle to the rich edit area is passed in (hWin) along with the start position (0 to start at the beginning) and the user object type (3 meaning TX Text Control). For VSSpell, the spell checking is initiated through the CheckWindow function: this.object.CheckWindow ( hWin ) where the handle to the rich edit area is passed in (hWin). For the WSpell utility, we set a few properties (including assigning one the handle of the rich edit area) before we call the Start function (see Listing 2). Finally, the WSpell and VSSpell utility will automatically replace a misspelled word with the correction selected by the user. However, the JRSpell utility calls only a changeword event on the spell-checking control, passing in the replacement word. The developer has to do the actual replacement of the text. Fortunately, that's easily accomplished by calling the ReplaceText function on the PowerBuilder RTE control: i_rte.ReplaceText ( newword )
Automated Data Fill Other features now supported include:
Sybase has gone to great lengths to maximize compatibility with the previous RTE control, including rejecting use of the Windows standard RTE control. Doing so put off the upgrade of the RTE control originally planned for PowerBuilder 10.0, risking the wrath of us, the PowerBuilder user community. Obviously, compatibility was important. While important, it wasn't 100% achieved. Our opinion would be that documented incompatibilities aren't significant. For example, ReturnsVisible, SpacesVisible, and TabsVisible have all been replaced by ControlCharsVisible. We're not picturing users running screaming down the halls because they can't make their returns visible and their spaces invisible. Then again, we haven't met your users. The help file in the release candidate we're looking at while writing this article documents other changes about as equally alarming to us. Then again, we haven't seen your application. Do your homework. Read the documentation (as you should with all changes in all releases) and make sure that the changes don't affect your application adversely.
Conclusion YOUR FEEDBACK
PBDJ LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING POWERBUILDER / SYBASE NEWS
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||