PC Review


Reply
Thread Tools Rate Thread

win32 help! (or COM?)

 
 
Lloyd Dupont
Guest
Posts: n/a
 
      22nd May 2005
I have downloaded this superb HTML Edit Control based on MSHTML
http://www.windowsforms.net/ControlG...290&tabindex=0
And it's also really big.....

Anyway, I would like to extend it with a very simple feature: typing
completion.
I need to know when the user type something and at which position of the
cursor (so I could show a popup listbox below).
Any clues/tips on how o do that?.....!!?


 
Reply With Quote
 
 
 
 
Gabriele G. Ponti
Guest
Posts: n/a
 
      23rd May 2005
Sometime ago I wrote something like that, but for a RichTextBox control so I
don't know for sure if you can use the same approach.

Anyway, what I did was to add event handlers for KeyPressEventHandler,
KeyEventHandler, and EventHandler.

In the KeyPress event you want to check if what the user typed so far is a
candidate for auto completion. If so you will display a list box with the
proposed words. If the list box is on screen you also want to handle the Esc
key to hide it, and the Tab/Enter keys to confirm the selection and insert
the selected word.

In the KeyDown event, when the list box is on screen you want to handle the
up and down keys and change the selected item accordingly.

In the DoubleClick event you just insert the selected word and hide the list
box.

HTH,

Gabriele


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
win32/adware.virtumonde and win32.privacyremover.m64 I don''t know anything Windows XP General 7 27th Aug 2008 07:13 AM
Defender Does nor remove Win32/Fotomoto and Win32/Virtumonde =?Utf-8?B?QUNT?= Spyware Discussion 5 14th Aug 2007 02:57 PM
Win32.SillyDI.FG, Win32.BETTInet,HTML.MHTMLREDIR/EXPLOIT,WIN32.SILLYDL.HQ Terry Windows XP New Users 3 8th Apr 2005 04:11 PM
Win32.Poza & Win32.Nachi Worms Bob P. Windows XP Security 1 26th Oct 2003 04:01 AM
help .....i had the win32.pinfi (win32 parite b) virus.....and now Platinumpoppa2003 Windows XP Help 1 20th Oct 2003 12:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:03 PM.