Questions tagged [wx.textctrl]

wx.textctrl refers to wxTextCtrl, which is a text control in wxWidgets that allows text to be displayed and edited

This tag refers to wxTextCtrl, a text control in that allows text to be displayed and edited.

32 questions
4
votes
2 answers

Change the size of wx.TextCtrl dynamically

I have a problem with wx.TextCtrl. I just want to set the size of the control box but i want to do it dynamically. And this does not work for any reason. Here i have my source code. #!/usr/bin/env python # -*- coding: utf-8 -*- import wx class…
Max16hr
  • 438
  • 2
  • 5
  • 20
3
votes
4 answers

Deleting lines from wx.TextCtrl

I am using a wx.TextCtrl to output text from a network daemon. As the output is quite verbose, the size of text in the TextCtrl can become huge (BTW is there any limitation on the size of the contents of a TextCtrl?) I would like to delete the top N…
Kurt Pattyn
  • 2,758
  • 2
  • 30
  • 42
3
votes
2 answers

How do I make wx.TextCtrl multi-line text update smoothly?

I'm working on an GUI program, and I use AppendText to update status in a multi-line text box(made of wx.TextCtrl). I noticed each time there's a new line written in this box, instead of smoothly adding this line to the end, the whole texts in the…
Shane
  • 4,875
  • 12
  • 49
  • 87
2
votes
0 answers

python spur ssh write sys.stdout to file

I am using the below code to run a long running command on a remote Windows server via ssh and trying to get the sys.stdout and write that to a file in realtime. The below code prints the sys.stdout but does not write it to the file. What am I doing…
speedyrazor
  • 3,127
  • 7
  • 33
  • 51
2
votes
1 answer

How to write wxPython textCtrl focus event

I'm trying to fire a line of code when the user clicks on a textCtrl. The end goal is to highlight the contents of the box when it is clicked on. I am aware that this is possible with wx.EVT_SET_FOCUS, but it's either buggy or I'm implementing it…
TboneH
  • 51
  • 1
  • 5
2
votes
3 answers

wxPython - wx.TextCtrl - forcing styles

just a simple question on a wx.TextCtrl element. i have this text field where on an application, where the user can add a string on it. i want a text field with a red text on it. so i've generated this code: self.hRepositoryTextfield =…
axel
  • 3,778
  • 4
  • 45
  • 72
2
votes
1 answer

Select text over multiple TextCtrls in wxpython

So I currently have a ScrolledPanel that contains a number of TextCtrls that are placed in a vertical BoxSizer programmatically. The reason I'm doing this instead of just appending lines to one big scrolled TextCtrl is so that I can also add other…
glittershark
  • 534
  • 2
  • 6
  • 19
1
vote
2 answers

Wx.stc.StyledTextCtrl ScrollBar

In my project, I use wx.stc.StyledTextCtrl(). I bind the events of key down and key up. When I want to add a letter into the TextCtrl, I don’t skip the event, in some reasons, I use the method AddText() in order to add a text. When the text is long…
Yuval Sharon
  • 159
  • 8
1
vote
1 answer

Which key is being pressed on event text wxpython

I'm using wx.TextCrtl bind to wx.EVT_TEXT for receiving input from the user but I don't know how to detect which key has been pressed (I can read the last char on the string using st[LengthOfString-1] but it's not good for keys that are not letters…
YehudaNOVO
  • 13
  • 3
1
vote
1 answer

wxpython RichtextCtrl event bindings on buttons/images

Just wondering whether there is any provision/method to bind clicks on images/(or include a button) to result into some events. Also is there any kind of way to draw a StaticLine kind of thing in a RichTextCtrl in wxPython.
SDK
  • 79
  • 2
  • 6
1
vote
1 answer

How to change shape of wx.TextCtrl widget in wxpython?

i want to change the shape of wx.TextCtrl widget used in wxpython. normal by default shape is a square box but i want to make all the corner having round curve.
Smit Gardhariya
  • 97
  • 1
  • 3
  • 8
1
vote
2 answers

How come this way of ending a thread is not working?

I just came out with my noob way of ending a thread, but I don't know why it's not working. Would somebody please help me out? Here's my sample code: import wx import thread import time import threading class TestFrame(wx.Frame): def…
Shane
  • 4,875
  • 12
  • 49
  • 87
1
vote
1 answer

wx.TextCtrl is blank for very long strings

I'm trying to display the string representation of a list of many float items in a wx.TextCtrl using the SetValue() method. As soon as the length of the string to be displayed reaches 6151 characters the TextCtrl goes blank and does not display the…
user5860663
  • 353
  • 2
  • 10
1
vote
1 answer

Popup menu at the insertion point position in a wx.TextCtrl

Does somebody knows how to create a custom context menu in a TextCtrl object using wxPython ? For the moment, I could create a custom menu but this one appears at the mouse cursor position , when the original one appears at the text cursor position…
taalf
  • 179
  • 1
  • 10
1
vote
0 answers

wx.TextCtrl don't wrap on OSX wxpython

I have a wx.TextCtrl window which I have a couple of bugs in, 1 bug in windows, 1 bug in OSX. Bug 1: I don't want to wrap the text in the wx.TextCtrl window, but must me multiline, this works fine in Windows, but not in OSX. Bug 2: When adding text…
speedyrazor
  • 3,127
  • 7
  • 33
  • 51
1
2 3