Couple Questions...

Topics: User Forum
Feb 26, 2009 at 1:31 PM
 Hey, I have a couple of questions which I was unable to find suitable answers to using search and I am deciding to just make a discussion about them so I can get the answers...

#1. I changed my Lexing property (In VS2008) to "Cpp" and I ran my application, but it doesn't syntax anything for me... Is there something else I need to do?
#2. I will probably want to change the bg to black and the text color to white, will that be a problem with syntax lexers ( As in, will it completely override the lexing properties? ). I will probably write my own lexer later on, so I won't have a problem with the lexer turning text black and therefore invisible...
#3. Is there a documentation or tutorials / FAQ for ScintillaNET? I don't want to keep bothering people with posts if there is somewhere I can find this information easily...I already saw the 4 how to's on the homepage, is there a way to find more of those? I already read the text saying there isn't, but has that changed since that was written?

 Also, this component looks amazingly great and I am so glad I found it... Scintilla was too hard for me trying to use it in C/C++ because I am still new to that language, so this component works out great!
Feb 26, 2009 at 2:54 PM
Edited Feb 26, 2009 at 3:02 PM
#3: Nope, no more since. I don't know if any more help will be generated, honestly. I've been the primary contributor to source code and what little help we have for the past couple years, and I think I'm pretty much burnt out.
#1: Just setting the lexer won't actually highlight code. Well it may to some degree but not fully. You need to have a full configuration for cpp that defines how each style is displayed. See on how to get started. Once somebody does this if they submit it to the project I'll include it to the list of built in languages and other people won't have to create their own configurations. All they have to do is set the ConfigurationManager.Langauge = "cpp".
#2: You actually have control on how each lexed style is displayed. All the lexer does is assign a style # to a block of code based on syntax. It doesn't have control over what color or font a style renders as. That's up to the application. The application can either manage the styles via the Styles property or define a configuration and let the ConfigurationManager handle it for you. However if you want to take the easy way out set the regular control properties BackColor and ForeColor. In addition you need to set UseBackColor and UseForeColor. This basically brute force loops through each of the styles definitions setting the appropriate style values. You might have to set these properties after you set the config language in order to make sure they aren't overridden.

>>Also, this component looks amazingly great and I am so glad I found it... Scintilla was too hard for me trying to use it in C/C++ because I am still new to that language, so this component works out great!
On behalf of all those who've worked on ScintillaNET: thanks!

(Edited for clarity)
Feb 26, 2009 at 3:05 PM
Edited Feb 26, 2009 at 9:21 PM
 First of all, thanks for the answers :D

 Secondly, it is unfortunate that the components that tend to offer the most customization ( and usually power ) are often treated the worst because of the fact that most people want to press 2 buttons and have everything work for them ( even if it is inefficient and not exactly what they want ). I still wish you guys would continue to work on it, even if it is a small effort, because these are the type of things that still give me hope that there are people who have pride in programming...

 -- EDIT --

 The syntax coloring is working fine!! But I have 2 problems/questions that I would like answers to please...

 #1. I changed the background color for my Line Numbering to green and it looks fine in VS2008, but when I run the application it turns back to the normal gray. Is there a "USE_COLOR" I need to turn on or something?

 #2. Secondly, how do I configure AutoComplete in XML... I added the words in a list, but it doesn't seem to autocomplete them...
   A. What does autocomplete actually do?
   B. What does FillUpCharacters mean or do?
   C. What is an accurate way to get this function to work properly? I looked at the html.xml in the source code, but I am kind of confused by it...

Feb 27, 2009 at 11:45 AM
>> B. What does FillUpCharacters mean or do?

I think the FillUpCharacters are those chars that will popup the autocomplete window after they are typed in.
For example:

FillUpChars = ".("

you are typing:  

private void blackList(POPUP

correct me if i m wrong.
Feb 27, 2009 at 5:20 PM
 Oh, that makes sense... Is there any way to set it to just do it if the word is near done?


 If someone is trying to write "CHICKEN", you would write "CH" or "CHI" and then it would pop up. Is that possible?