Questions tagged [wxstyledtextctrl]
33 questions
4
votes
2 answers
Python wx.stc custom highlighting
By lack of answers on many occasions, and the good answers I have received here, here's my question.
I'm writing a program for the ABC music notation language (sample given below). This is not a supported language in wx.stc, and I have not yet found…

ShadowFlame
- 2,996
- 5
- 26
- 40
2
votes
2 answers
How to not allow undo (Ctrl+Z) in Wx.Stc.StyledTextCtrl
I do a project in python-3 and I create a gui with wxpython. In the gui, I use wx.stc.StyledTextCtrl and I wan't that the user won't be able to do undo (Ctrl + Z). There is an option to do that? It is also be awesome if someone knows how to not…

Yuval Sharon
- 159
- 8
2
votes
0 answers
Making wxStyledTextCtrl use exact same font as wxTextCtrl
my problem is best described by the image below:
The two text edit controls on the left are wxTextCtrl and the one one the far right is wxStyledTextCtrl. I'm using wxStyledTextCtrl for the disassembly editor (the one on the right) because I want to…

blashyrk
- 107
- 1
- 6
2
votes
2 answers
How can I load true type front (ttf) into wxPython from file directly
I'm working on a wxPython project with text editing capabilities. I want to package a font with this project (a .ttf file) and have it as the default font for the text editor. Can this be done in wxPython? There was a similar question in 2007 in…

user3247720
- 23
- 3
1
vote
0 answers
Append text to wx.stc.StyledTextCtrl
I would like to add text or a char to my StyledTextCtrl in a specific position. for example add the char 'a' after the position 52 (after 52 chars).
import wx
from wx.stc import StyledTextCtrl
app = wx.App()
frame = wx.Frame(None, -1, title='2',…

Yuval Sharon
- 159
- 8
1
vote
1 answer
Lock wx.stc.StyledTextCtrl
I want to lock my wx.stc.StyledTextCtrl and to not allow writing into it. Someone knows a function that can do that? something like messagetxt.Lock()
In addition, I want to add text where the insertion point, from the code when it is in…

Yuval Sharon
- 159
- 8
1
vote
1 answer
wxStyledTextCtrl how to style keywords
Having some trouble getting wxStyledTextCtrl to colourise my word listings.
x->m_ctlEdit->SetKeyWords(0,"true false");
x->SetWordChars(wxT("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMONPQRSTUVWXYZ._") );
x->StyleSetForeground(wxSTC_HPHP_WORD,…

Prodigle
- 1,757
- 12
- 23
1
vote
0 answers
wxPython StyledTextCtrl and shortcuts
I use StyledTextCtrl in wxPython application and faced with a problem. Main menu
has shortcuts like Ctrl+Alt+C, Ctrl+Alt+... In Windows is all OK, but
in Ubuntu when user pressed this shortcut, StyledTextCtrl adds control
characters ("SOH",…

Евгений Ильин
- 111
- 4
1
vote
2 answers
How to control LineIndentation in wxStyledTextCtrl when user presses Enter
When user presses Enter key in wxStyledTextCtrl, it seems that the cursor always goes to beginning of the line (zero indentation), which is most likely the expected behavior.
I want to be able to write Script code with the following format, with…

macroland
- 973
- 9
- 27
1
vote
1 answer
wxWidgets / wxStyledTextCtrl - Highlight all occurrences when doubleclicking
I am using wxWidgets 3.0.2 in a static unicode build on Windows 10. I am using a wxStyledTextCtrl, which is a near 1-to-1 mapping of Scintilla.
I am looking for functionality similar to Notepad++ where upon double-clicking on something in the…

User51610
- 453
- 5
- 18
1
vote
1 answer
Is there a way to be notified when the user makes changes in a wxStyledTextCtrl?
I have a wxWidgets application that has a wxStyledTextCtrl. But for the life of me, I cannot figure out how to get notified of modification events.
I have the following code:
void CMainWindow::OnDocumentModified(wxStyledTextEvent & event)
{
…

Nathan Osman
- 71,149
- 71
- 256
- 361
1
vote
1 answer
How to get TRUE column position in wxStyledTextCtrl?
I have a wxStyledTextCtrl and I want to find the column number of a given position in the document. Basically I want a function like GetColumn but I don't want tabs to be expanded.
Does such a function exist?

Nathan Osman
- 71,149
- 71
- 256
- 361
1
vote
1 answer
An issue with calling w.stc.StyledTextCtrl.SaveFile with a unicode content
I have a wxPython GUI with a wx.stc.StyledTextCtrl text editor. It is possible that its content contain some unicode characters such as Greek letters. I have noticed that StyledTextCtrl.SaveFile() method works only when the content has no unicode…

happyhuman
- 1,541
- 1
- 16
- 30
1
vote
3 answers
wxPython StyledTextCtrl Set (Partial) Text Color
How to set text color in a StyledTextCtrl, but only some word? I mean let's say I have
Lucy is Blue
and I want only the word 'Blue' to be colored Blue

絢瀬絵里
- 1,013
- 2
- 14
- 27
0
votes
1 answer
wxStyledTextCtrl: Autocomplete Image displays incorrectly
I need help with Autocomplete box with Images. I cannot get it display
correctly. I have tried with wxArtProvider bitmaps as well as custom
ones but result is the same. Bitmaps are 16x16. screen shot can be
seen below. Images are a bit hidden not…

Stefano Mtangoo
- 6,017
- 6
- 47
- 93