scintilla

wxPython - StyledTextCtrl get currently visible lines

女生的网名这么多〃 提交于 2019-12-11 06:08:55
问题 I am still working on my text editor, and now I want to make it run faster. So I thought I may somehow get currently visible text, and parse it as I want. So is there a way to get currently visible lines? P.S. Or maybe there is another way to increase StyledTextCtrl's performance? Thanks. 回答1: Use GetFirstVisibleLine() to determine the first visible line. Lines are numbered starting at zero. Use LinesOnScreen() to determine how many lines are visible on the screen. You can use GetLine(line)

setting line to read-only

泄露秘密 提交于 2019-12-11 05:53:52
问题 Ive been looking though the QsciScintilla API, and I want to know how to set a line in a text editor to read -only. I know it provides a setReadOnly function. But this sets the whole text editor to read-only. Any suggestions on how to set a line to read-only? Im using PQT4 Python 3x 回答1: You can't really do this. There is a low-level feature in the underlying Scintilla control that can prevent the caret moving into an area of text - but it cannot prevent deletion of a broader area of text

Indentation and smart indent in ScintillaNET

ε祈祈猫儿з 提交于 2019-12-11 01:39:36
问题 Can someone describe me how to make indentation work in Scintilla.net? this.scintilla1.Indentation.SmartIndentType = ScintillaNet.SmartIndent.Simple; I'm confused on what needs to be done to get it to work. Can someone describe what event handlers need to be implemented to get indentation to work? 回答1: The trick is to set Indentation.IndentWidth to 8 , if Indentation.TabWidth is also set to 8 . Of cource Indentation.SmartIndentType must still be set to Simple . 来源: https://stackoverflow.com

Creating and colorizing new constructs on a existing Scintilla lexer

对着背影说爱祢 提交于 2019-12-10 21:51:33
问题 All, I'm using QScintilla to syntax-highlight my domain specific language (DSL). Since my DSL is based on python, I use the existing Python Lexer for QScintilla. I manage to create new keywords as following: self.text = Qscintilla(self) pythonLexer = QsciLexerPython(self.text) self.text.setLexer(pythonLexer) self.text.SendScintilla(QsciScintilla.SCI_SETKEYWORDS,1,bytes('WARNING', 'utf-8')) Now, how do I choose a color to highlight my newly created keywords? Thanks a lot! 回答1: The

Alternate row coloring in Scintilla

廉价感情. 提交于 2019-12-10 16:51:46
问题 I'm using wxStyledTextCtrl from wxPython, a wrapper around the Scintilla component. Is there any way to get alternate row coloring on it (odd rows in one background color and even rows in another color)? I'm using the builtin python styler to highlight keywords. 回答1: The background of lines can be changed, for example by markers (which is used for stuff like bookmarks or breakpoints, current execution point and the like in IDEs), but there is no built-in mode for changing the background

Scintilla .NET - Can't find libraries

旧街凉风 提交于 2019-12-08 19:51:33
问题 I'm trying to get Scintilla .NET working in a C# form I'm making. I've followed the directions provided in the readme such as adding the Scintilla component to the toolbox, but when I try to drag the component to a C# form I get this following error: http://tinypic.com/r/152m7wx/4 I've placed the two included dlls (SciLexer.dll, ScintillaNET.dll) in my system32 folder. I can't seem to figure out what's wrong. I'm using VS 2008, and Windows 7. Any ideas why I'd be getting a File not found

Syntax highlighting control for Mono?

孤街醉人 提交于 2019-12-07 07:41:44
问题 I can't seem to find any syntax highlighting widgets/controls for Mono. I know that GtkSourceView has a Mono version, but I can't actually find it anywhere. Any help would be greatly appreciated. :) 回答1: My favorite code editor control is Scintilla. It has native support for windows, gtk and cocoa. An excellent .net wrapper is available at ScintillaNET although I have no idea how well it supports gtk. 回答2: Have you taken a look a the MonoDevelop editor? https://github.com/mono/monodevelop

Workaround for inability to bind to a property that belongs to a WindowsFormsHost Child object in C#/XAML app?

≯℡__Kan透↙ 提交于 2019-12-06 05:27:36
问题 I have a C# WPF 4.51 app. As far as I can tell, you can not bind to a property belonging to an object that is the child of a WPF WindowsFormsHost control. (If I am wrong in this assumption please show me how to do it): Bind with WindowsFormsHost In my case, I have a page that contains a WindowsFormsHost control whose Child object is a ScintillaNET editor control: https://github.com/jacobslusser/ScintillaNET <WindowsFormsHost x:Name="wfhScintillaTest" Width="625" Height="489" Margin="206,98,0

Syntax highlighting control for Mono?

≡放荡痞女 提交于 2019-12-05 18:46:32
I can't seem to find any syntax highlighting widgets/controls for Mono. I know that GtkSourceView has a Mono version, but I can't actually find it anywhere. Any help would be greatly appreciated. :) My favorite code editor control is Scintilla . It has native support for windows, gtk and cocoa. An excellent .net wrapper is available at ScintillaNET although I have no idea how well it supports gtk. Have you taken a look a the MonoDevelop editor? https://github.com/mono/monodevelop/tree/master/main/src/core/Mono.Texteditor 来源: https://stackoverflow.com/questions/12504850/syntax-highlighting

Notepad++ plugin - find and highlight text

烈酒焚心 提交于 2019-12-04 15:27:27
How do I set and remove color for the find text in a scintilla document by writing plugins for notepad++ in c# . I tried the following code: Win32.SendMessage(PluginBase.GetCurrentScintilla(), SciMsg.SCI_STYLESETBACK, 0, 0xFFFF00); Help me to highlight a particular text. If you want to change the selection background color , then try: Win32.SendMessage(PluginBase.GetCurrentScintilla(), SciMsg.SCI_SETSELBACK, 1, 0xFFFF00); If you want to change the selection foreground color , then try: Win32.SendMessage(PluginBase.GetCurrentScintilla(), SciMsg.SCI_SETSELFORE, 1, 0xFF0000); To reset the default