Questions tagged [wxtextctrl]

wxTextCtrl is a text control in wxWidgets that allows text to be displayed and edited

wxTextCtrl is a text control in that allows text to be displayed and edited

105 questions
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

create a command terminal like window using wx controls

I am trying to create a command terminal like window..I have used the following code..Problem is that it set the command prompt as ">>>" that is editable. I want window with fixed ">>>" with cursor waiting for command...now the issue is that user…
user2764578
  • 61
  • 3
  • 10
1
vote
3 answers

How to make wx.TextCtrl content NOT selected by default?

Here's my problem: self.textCtrl1 = wx.TextCtrl(id=wx.ID_ANY, name='textCtrl1', parent=self, pos=wx.Point(0, 100), size=wx.Size(400, 100), style=wx.VSCROLL | wx.TE_MULTILINE, value='') self.textCtrl1.SetValue("I don't…
Shane
  • 4,875
  • 12
  • 49
  • 87
1
vote
1 answer

wxPython textctrl temporarily gets black rectangle

So, I'm trying to write a program using wxPython which will have a notebook with tabs that each have the user enter some data into textboxes. This is for a physics related project so I want each textbox to have a "units" label after it displaying…
Lambda
  • 270
  • 2
  • 12
1
vote
1 answer

Python/wxPython: How to reset wx.Choice to a default value

Am working with multiple wx.Choice control in wxPython and I needed the make a reset button to restore the default option “-- Select --” when clicked. Am unable to achieve that, the closest I came is to reset to empty options which is NOT what is…
Umar Yusuf
  • 926
  • 2
  • 13
  • 30
1
vote
3 answers

Is it possible to draw on a TextCtrl? And if so, how?

I'm trying to elaborate a TextCtrl with some line drawings: simple stuff I want to draw on the text, next to it, between lines, etc. And I'm approaching drawing in Wx like I've done it before, on WxPanels: with DCs: $dc->DrawLine( 15, 15, 120, 120);…
isync
  • 537
  • 6
  • 15
1
vote
1 answer

How to lock contents in wxTextCtrl?

I am trying to implement a simple application. It use wx.FileDialog to select a file, then display the file name in a wx.TextCtrl component. It works allright at first, the file name was displayed as expected. However, when the mouse move over the…
ChangeMyName
  • 7,018
  • 14
  • 56
  • 93
1
vote
1 answer

wxPython: Binding Multiple Widgets to the Same Handler

I have created a huge code and my program is a bit slow,I want to ask if there is a way to bind multiple widgets into the same handler...see below some parts of my code self.button=AB.AquaButton(self,label="Sensor 1",pos=(10,10),size=(90,35)) …
pap
  • 19
  • 5
1
vote
1 answer

How do I make wxTextCtrl handle with ctrl-c in linux

in linux, wxTextCtrl don't handle "contrl+c","contrl+x","contrl+v",when its parent window have accelerator(shortcut key) with these three kinds of key. when these key are pressed,parent window will handle them false in its own window rather than…
1
vote
2 answers

How to align a text dynamically in wxTextCtrl?

I would like to align selected text in wxTextCtrl to left or right. This is the code of my entire program. I need to align text to right, and left on button click. class Beditor(wx.Frame): def __init__(self, parent, id, title): …
user2085779
1
vote
1 answer

Best way to replace an arbitrary row in a multiple line wxTextCtrl

GetLineText is great for getting a particular line, but there is no corresponding SetLineText. If one existed, that's what I'm looking for. Since it doesn't appear to, what's the best way to handle this? Note: I don't want to replace ALL of the text…
Software Prophets
  • 2,838
  • 3
  • 21
  • 21
1
vote
1 answer

Problems with setting insertion point in a wxTextCtrl

I'm trying to implement a custom widget in wxWidgets (version 2.8.12), essentially a modified single line wxTextCtrl. It takes a text input that consists of two sets of 8-digit hexadecimal numbers separated by a space, and I want the control to…
vinnydiehl
  • 1,654
  • 1
  • 13
  • 17
0
votes
1 answer

How to disable a wxTextCtrl Widget in wxWidgets C++?

I'm writing a wxWidgets program in C++. It has several single line wxTextCtrls in it and I need to disable them so the user cannot enter text in them. Later, when a menu item is clicked, I want to enable them again. How do I do this?
0
votes
1 answer

wxWidgets: Frame size is not changing in Image panel

I am using wxWidgets 'An Image Panel' code. Here I made only one change. I want frame size should be equal to image size, My Image size is 762x463, but my frame size is different. frame SetSize function is not…
badai shaibaz
  • 47
  • 1
  • 7
0
votes
1 answer

How do I hide the text cursor in wx.TextCtrl?

I'm using TextCtrl in wxPython to display text read-only: control = wx.TextCtrl(self, style=wx.TE_MULTILINE | wx.TE_READONLY) However, the text cursor is still there, blinking. Can I somehow hide that cursor (not the mouse pointer)?
florisla
  • 12,668
  • 6
  • 40
  • 47