Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Implement intellisense in editor
Message
From
24/06/2019 03:41:31
 
 
To
24/06/2019 03:07:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01669241
Message ID:
01669266
Views:
42
>>>In our application is an Editor (Richtext Control) which is used by the user to create Konfiguration files. I am wondering what would be the possibility to create something like IntelliSense, where the program detects if an object (or Aliasname) exists and lists the members to select from. If someone has thoughts or ideas, I would highly appreciate your Input.
>>
>>I did this with Visual FreePro, Jr. for something called SourceLight. For SourceLight I extracted each word and parsed it against a lookup table to find out if it's a known symbol. There were hard-coded keywords, as well as contextual variables that are known, as well as the ability to add in child objects.
>>
>>By using something like the .SelStart member you could find out contextually from where you are in the control, and gather the things around that place, looking for things like "." and finding child members, and for each of them create a window that has no border and is effectively a splash screen located nearby to where they're typing (which you may have to calculate), and have it pop up. Re-use the same control to add new content to the splash screen popup and move it about as the user is typing something.
>>
>>You can also use the same thing for monitoring mouse movement and using timers and popping up hovers for when they hover of something for a period of time.
>>
>>Visual FreePro, Jr.'s editor had all of these features, but they were written in C++ and used an internal system I created called SEM (effectively a syntax-highlighting line editor with limited html support).
>
>Thanks, that is something I could imagine to implement. I was planning to use the Keypress event and only popup the IntelliSense when the dot is being entered. Hovering is not necessary, i will try to keep it simple. One issue I have with creating windows, I have never worked much with windows and wonder how easy they are to control. In Commandline when typing _SCREEN. then the IntelliSense appears and gets cleared on escape or typging a space or carriage return. However the Input field remains with the focus, so it must be another window that does not receive the focus.

If you want to do it with Windows -based windows, and not forms, I can create a little DLL or FLL for you to handle common tasks. I think the hardest thing to implement in user app space will be correct spacing so it pops up contextually.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform