Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9063

Re: Getting the Handle of the DW Edit control to pass to a spell checker

$
0
0

Replied to wrong msg in thread - content still valid

 

 

 

Maybe you can use the ItemFocusChanged event on the DW to figure out if the spellcheck should be turned on for the field.

 

Here's an idea, not sure if it'll work for you.

 

On the ancestor of the datawindow control, add the following items:

 

FUNCTION ulong WinGetFocus( ) LIBRARY "User32.dll" alias for "GetFocus"

 

string is_spellcheckcols     // comma separated list

string is_spellchecktypes     // command separated list of col types to check

long il_spellcheckhandle     // long value representing the GetFocus handle

 

In the DW ItemFocusChanged event

 

il_SpellCheckHandle = WinGetFocus()          // redefined Arnd's call definition to make it different from the built in version

 

// see if it's a column name or col type that we want, and the handle is valid

if (pos(lower(is_spellcheckcols), dwo.name) = 0 and &   pos(lower(is_spellchecktypes), this.describe(dwo.name+".coltype") = 0) or &

     il_spellcheckhandle = 0 then return

 

// set up spellcheck functionality here using il_SpellCheckHandle


Viewing all articles
Browse latest Browse all 9063

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>