Questions tagged [textctrl]

A widget in the wxWidgets framework for displaying and editing text.

TextCtrl is a widget in the wxWidgets framework for displaying and editing text.

Related Tags

62 questions
2
votes
2 answers

wxPython TextCtrl transform to UPPERCASE

I was looking for a way to transform text entered into the textctrl field to uppercase. I tried using a validator and transforming the value of the key event object to the uppercase letter char value using 'ord' however I could not find any 'set'…
user124626
1
vote
1 answer

Deleting lines from the middle of a TextCtrl

I need to delete X lines from the middle of a textctrl starting from line number Y Is there any easy way to do this? I can't see one: it seems like I have to somehow search through the contents of the TextCtrl counting newlines to find the…
GreenAsJade
  • 14,459
  • 11
  • 63
  • 98
1
vote
2 answers

wxpython textctrl doesn't write when bound

I have been working on a simple textctrl project to get more acquainted with wxpython and I have hit a small road block. I am making a simple code editor, and I am currently working on the syntax highlighting. Everything works fine except because I…
drfrev
  • 35
  • 2
  • 7
1
vote
2 answers

wxpython textctrl How to find out where the text pointer is

I need to know where the text pointer (blinking line) is in the textctrl. I would also like to know if it is possible to get the entire line that the pointer is on, or if I would just have to write the code to get the current line from the pointer…
drfrev
  • 35
  • 2
  • 7
1
vote
1 answer

wxPython - capturing shell output in a textctrl widget?

I'm learning python and wxPython at the same time... :) So, I have a set of python files that run fine from the command line: ./scan -d test ~/Pictures -- for instance will create a database of my pictures called "test." I've been working…
chow
  • 484
  • 2
  • 8
  • 21
1
vote
1 answer

wxpython: How do I move the caret in a TextCtrl to the mouse position when opening a context menu

In wxpython the default behavior of a TextCtrl context menu is that the caret moves to the position in the TextCtrl that was right-clicked. When I overwrite the EVT_CONTEXT_MENU event and create my own menu, this behavior is missing. Is there an…
Naa
  • 13
  • 3
1
vote
1 answer

Python textctrl setstyle cannot read the insertionpoint correctly

I am using python textctrl in a GUI I wrote. After I read several files, I post the contents of the file in textctrl. Since they are all in similar format, I tried to color the first several charactors to mark out the start of each file output. What…
Mua
  • 31
  • 1
  • 6
1
vote
3 answers

How to pass UTF-8 string from wx.TextCtrl to wx.ListCtrl

If I enter Baltic characters in textctrl and click button test1 I have an error "InicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)" Button test2 works…
rp101
  • 1,239
  • 2
  • 10
  • 10
1
vote
1 answer

WxPython[TextCtrl] : The way of locate the cursor to end of text using TextCtrl function.

nice to meet you. I have a some problem about using wxpython. That's I can't control cursor of TextCtrl Function. That is my wxpython code. #!/usr/bin/python import wx def get_main_screen_text(): text = "\n [Anyfusion Monitoring…
Hans
  • 161
  • 1
  • 11
1
vote
3 answers

Difference between wx.TextCtrl .write / .WriteText / .AppendText

I am new to Python and so i am new to wxPython as well. I was just wondering if there is any difference between these wx.TextCtrl functions. This mini code shows three times the same output. If there is no difference, is there a historic reason for…
ChrisM
  • 35
  • 1
  • 6
1
vote
2 answers

wxpython textctrl printing to a specific line

I must be googling using the wrong terms because I can not find what I am looking for. Any help appreciated. How do I write to a specific line within a textctrl? Currently my program processes files, when processed the files are listed within the…
Clinton Moffat
  • 211
  • 1
  • 2
  • 12
1
vote
2 answers

How do I get the scroll position / range from a wx.TextCtrl control in wxPython

I have a little logging app (written in wxPython) that receives data from a bit of kit we're developing, and I want to display the text in a scrolling window. As it stands I'm using a wx.TextCtrl for the text display, but I'm having some issues with…
Jon Cage
  • 36,366
  • 38
  • 137
  • 215
1
vote
2 answers

wxPython: Put wx.TE_PROCESS_ENTER on Masked TextCtrl

Searching on google and I found that is impossible to using wx.TE_PROCESS_ENTER on masked TextCtrl, I try it myself to set style=wx.TE_PROCESS_ENTER then bind it with wx.EVT_TEXT_ENTER, but nothing happen. What I was trying to do is making many…
Kyomuu
  • 107
  • 1
  • 9
1
vote
2 answers

wxPython: How to make a TextCtrl not fill the whole panel?

I have a panel containing a button as well as another panel which itself contains a textCtrl. I have a panel just for the textctrl because I am trying to have a custom border color around the textCtrl. Unfortunately I can not get the textCtrl to not…
1
vote
1 answer

how to make key event wxpython in textctrl?

here is my code python 2.7 & wxpython 2.8 http://pastie.org/4248326 these 3 textctrl, at the chat_c(textctrl) i want to make chat_c and text_c like a chatting room input is chat_c output is text_c that is why i use def OnReturnDown(self,e): …
ingsun
  • 107
  • 4
  • 14