Quantcast
Channel: ScintillaNET Forum Rss Feed
Viewing all 296 articles
Browse latest View live

New Post: Show the hidden characters and show the column number.

$
0
0
Hi,
I've just downloaded the ScintillaNET v2.5.2. I have the questions:
  • How can I show the hidden characters like: tab, new line, space, ...
  • How can I show the column number, I mean the vertical line number?
Thanks a lot for helping.
Tom

New Post: ScintillaNET.dll as a single dll (with SciLexer.dll and SciLexer64.dll as embedded resource)

$
0
0
I did not saw SciLexer source code and did not know that it use try/catch block.
When i catch some time i will try to extend Microsoft.WinAny.Helper DynamicNativeLibrary and implement PEB (Process Environment Block) handling which will allow sage try/catch block.

New Post: Can I use the ScintillaNET on commercial project

$
0
0
ScintillaNET is released under the same license as Scintilla, which does allow for use in commercial products.

New Post: Can I use the ScintillaNET on commercial project

$
0
0
Note that there is a requirement; the copyright notice for ScintillaNET and Scintilla MUST appear in the program, and the license must appear in the documentation along with the copyright notices. Although you're unlikely to be sued, this is a legal requirement.

DISCLAIMER: I am not a lawyer, my interpretations of the law are not to be taken as legal advice. Please seek the help the of a lawyer for any official matters of law.

New Post: Can I use the ScintillaNET on commercial project

New Post: SendMessage

$
0
0
You can pass a message to the control like this:

scintilla.NativeInterface.SendMessageDirect(message);

where message is the message you would like to pass and scintilla is the name of your control

New Post: How to highlight particular line

$
0
0
You can use markers to do this. Here is an example:

Marker lineHighlighter = scintilla.Markers[2];
lineHighlighter.BackColor = System.Drawing.Color.Yellow;
lineHighlighter.Symbol = MarkerSymbol.Background;
scintilla.Lines[1].AddMarker(lineHighlighter);

(2 is just the number I used for my highlight marker since I already used 1 for breakpoints)

Here is a screenshot of how the line highlighter looks in my ScintillaNET-based IDE:

Image

New Post: Using the latest version of Scintilla

$
0
0
The latest version of Scintilla is 3.3.6. Is it possible to use it instead? And how do you build a x64 version of it, anyways?

New Post: UpdateUI Event bugged for back-tab?

$
0
0
Hi,

I have currently a problem with the UpdateUI Event. I use this Event to implement custom Brace Highlighting and everything works fine, except for one specific case. I use this Event:
scintilla1.NativeInterface.UpdateUI += (s, e) =>
{
    // Display if the Event was triggered
    counter++;
    textBox1.Text = counter.ToString();
                
 };
Now, I start the program and add one char. Then I press two times tab. Until now everything fine. But when I now press shift-tab to tab one indentation back, the UpdateUI Event does not get fired, although the selection changed (the caret moved back one indentation).

How can this bug be fixed?

Greetings,
2mQ

New Post: UseFont property?

$
0
0
If you want something shorter try this ...
        Dim I As Integer
        For I = 1 To 200
            Scintilla1.Styles(I).FontName = "Envy Code R"
            Scintilla1.Styles(I).Size = 14
        Next

New Post: Styles: Default.XLM

$
0
0
I was looking at the Default.XLM file in the configuration directory. It seems that someone wanted to standardize the the Style names (and that sounds perfectly logical). Out of curiosity I dumped all the styles from the built in languages to compare them. There are a total of 1907. I sorted these by the style numbers. I note that there is limited consistency in the use of the styles between various languages. It is most consistent at the top and bottom ends but in the middle there are a great number of variations.

At the bottom end "style0" is consistently refered to as "DEFAULT" or "DOCUMENT_DEFAULT" except for the following:
Hypertext, PhpScript and Xml refer to it as "HTML.DOCUMENT_DEFAULT".
Mmixal refers to it as "LEADWS"
Opal refers to it as "SPACE"
They do all use the same attributes (Font, size, color, etc).

After that all bets are off.
Style1 has several colors and a range of names.
(Specman uses style1 with a red foreground on a red background ... that has got to be hard to read.)

Anyway I came to the conclusion that anyone wants to standardize the Stylenames then they will want to consider the amount of effort that is going to be required to rewrite all the language configurations as well.

The other thing that this wild goose chase revealed is the only built in language that does not use a Lexer by the same name is XML which uses the "hypertext" lexer.

I do not see any way to attach a file so I will make this file available on my Web site temporarily for anyone that is interested: StyleList.zip

This is the VB 2010 code used to extract the information:
Private Sub Button6_Click(sender As System.Object, e As System.EventArgs) Handles Button6.Click
        ' The idea here is to write all style to and file so that we can compare them
        ' The file will be tab delimited and conatained a header line
        ' It is intended to be loaded into a spreadsheet
        Dim Languages() As String = [Enum].GetNames(GetType(ScintillaNET.Lexer))
        Array.Sort(Languages)
        For Each Lang In Languages
            ComboBox1.Items.Add(Lang)
        Next

        Dim I, J, K As Integer
        Dim H, T As String
        Dim N As Integer
        MyTop = 0
        Dim FileName As String = "C:\Tempwork\StyleList.txt"
        ' Header Line
        H = "Language" & vbTab & "Lexer" & vbTab & "Style No" & vbTab & "Style Name" & vbTab & "Font Name" & vbTab & "Charater Set" & vbTab & _
            "Font Size" & vbTab & "Bold" & vbTab & "Italic" & vbTab & "Under Line" & vbTab & "Case" & vbTab & "Back Color" & vbTab & _
            "Fore Color" & vbTab & "Visibile" & vbTab & "EOL Filled" & vbCrLf
        ' Overwrite file
        My.Computer.FileSystem.WriteAllText(FileName, H, False)

        For I = 0 To ComboBox1.Items.Count - 1
            H = ComboBox1.Items(I).ToString
            Scintilla1.ConfigurationManager.Language = H
            H = H & vbTab & Scintilla1.Lexing.LexerName
            N = Scintilla1.Lexing.StyleNameMap.Count
            For J = 0 To N - 1
                ' Style Number and Name
                K = Val(Scintilla1.Lexing.StyleNameMap.Values(J).ToString)
                T = H & vbTab & Str(K)
                T = T & vbTab & Scintilla1.Lexing.StyleNameMap.Keys(J).ToString
                ' Style properties
                T = T & vbTab & Scintilla1.Styles(K).FontName.ToString
                T = T & vbTab & Scintilla1.Styles(K).CharacterSet.ToString
                T = T & vbTab & Scintilla1.Styles(K).Size.ToString
                T = T & vbTab & Scintilla1.Styles(K).Bold.ToString
                T = T & vbTab & Scintilla1.Styles(K).Italic.ToString
                T = T & vbTab & Scintilla1.Styles(K).Underline.ToString
                T = T & vbTab & Scintilla1.Styles(K).Case.ToString
                T = T & vbTab & Scintilla1.Styles(K).BackColor.ToString
                T = T & vbTab & Scintilla1.Styles(K).ForeColor.ToString
                T = T & vbTab & Scintilla1.Styles(K).IsVisible.ToString
                T = T & vbTab & Scintilla1.Styles(K).IsSelectionEolFilled.ToString
                ' append to file
                My.Computer.FileSystem.WriteAllText(FileName, T & vbCrLf, True)
            Next
        Next

    End Sub

New Post: Things that will crash Microsoft's XML reader.

$
0
0
Perhaps "crash" is not the correct word.
In Internet Explorer it will recover and just not display anything.
In Visual Studio it falls into an endless loop of some kind.
Two dashes "-" in a row inside a comment:
<!-- This is a comment -- that will hang up the XML reader -->

The same field name use twice in the same definition:
<Style Name="USER1" ForeColor ="Red" Bold="True"  ForeColor ="yellow" />

New Post: Minimal XML files

$
0
0
The following code will create minimal XML files for each of the languages supported by the native Scintilla.dll. They will not restore functionality but they will keep the program from crashing if the Scintilla1.ConfigurationManager.CustomLocation is used.
    Private Sub Button7_Click(sender As System.Object, e As System.EventArgs) Handles Button7.Click
        ' Note that you will need "FULL RIGHTS" for the target directory
        Dim TargetPath As String = "C:\ScintillaNET\XML\"
        Dim TargetFile As String = ""
        Dim T As String = ""
        Dim Languages() As String = [Enum].GetNames(GetType(ScintillaNET.Lexer))
        Array.Sort(Languages)
        For Each Lang In Languages
            ' build the file name
            TargetFile = TargetPath & Lang & ".xml"
            ' See if already exists
            If Dir(TargetFile) = "" Then
                ' example minimal file
                '<?xml version="1.0" encoding="utf-8"?>
                '<!-- This is a minimal language configuration file for ScintillaNET -->
                '<ScintillaNET>
                '<Language Name="ada">
                '<Lexer LexerName="ada"/>   
                '</Language>
                '</ScintillaNET>
                ' ScintillaNET uses Microsoft's XML reader. 
                ' This is an extremley non-fault tolerate piece of software.
                ' A single byte out of place anywhere will bring it to its knees.
                T = "<?xml version=" & Chr(34) & "1.0" & Chr(34) & _
                      " encoding=" & Chr(34) & "utf-8" & Chr(34) & "?>" & vbCrLf
                T = T & "<!-- This is a minimal language configuration" & _
                      " file for ScintillaNET -->" & vbCrLf
                T = T & "<ScintillaNET>" & vbCrLf
                T = T & "<Language Name=" & Chr(34) & Lang & Chr(34) & ">" & vbCrLf
                T = T & "<Lexer LexerName=" & Chr(34) & Lang & Chr(34) & "/>" & vbCrLf
                T = T & "</Language>" & vbCrLf
                T = T & "</ScintillaNET>"
                ' It makes absolutely no differences which of these you use. 
                ' The result is the same.
                ' My.Computer.FileSystem.WriteAllText(TargetFile, _
                         T, False, System.Text.Encoding.ASCII)
                My.Computer.FileSystem.WriteAllText(TargetFile, _ 
                         T, False, System.Text.Encoding.UTF8)
            End If
        Next

    End Sub

New Post: Using the latest version of Scintilla

$
0
0
In theory it should be possible. To build a 64-bit version you need to use the 64-bit VS command prompt and follow the Scintilla build instructions.

Jacob

New Post: ScintillaNet SandBox

$
0
0
One of the big problems in creating a new ScintillaNet XML file is determining what Lexer to use and finding out what styles are available with the Lexer and more specifically what they are used for. A utility program has been created to address that problem. I have named it ScintillaNet SandBox because it is a place to play with the different Lexers and Languages. It also outputs XML files for style set for any of the native Scintilla Lexers.

FREE, PUBLIC DOMAIN with SOURCE of COURSE.

Look for the SandBox section at:
http://www.keywild.com/SQLite/KeyWild_SQLite_index.htm

Image
Image

New Post: Using the latest version of Scintilla

$
0
0
After figuring out the compilation conundrum (I am not a native developer, but I know some stuff, but usually use MinGW-w64 and (currently) Msys2), I tried to make PowerShell work, but had no luck with it. I have been thinking on it, and will look at the name of the lexer to see if I had just not used the right name.

I will post back here with results.

New Post: ScintillaNet SandBox

New Post: ScintillaNet SandBox

$
0
0
You are welcome.
The PDF document for SandBox also lays out as the section structure of the Scintilanet XML files as best I could figure it out.
This app sorts out most of the information about the Lexers and the associated Styles but SandBox falls short of addressing such things as tooltips, snippets and language properties.

New Post: Release Memory

$
0
0
Hi,
I have been using the .NET (ScintillaNET.dll - 2.5.2) for quite sometime in a log analyser program that would load the text in one chunk (using VB.NET).
Now that I have implemented chunking to load large files, when loading each page I clear the contents of the previous chunk using:

Scintilla_RawLogFile.ResetText()

However, this does not seem to release the memory from each reload and when loading in additional pages (chunks) using either of the commands below the memory keeps growing until the program crashes with an out of memory error:

Scintilla_RawLogFile.Text = Chunks(currentChunk).Text

or

Scintilla_RawLogFile.AppendText(Chunks(currentChunk).Text)

Is there a way or method to release this overhead that Scintilla uses?

Cheers

New Post: Horizontal scrollbar range

Viewing all 296 articles
Browse latest View live


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