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
5
votes
1 answer

Easy way to get a wxTextCtrl click event?

Is there an easy way to handle when a user clicks on a wxTextCtrl? After reading the docs wxTextCtrl I see that there isn't a click or double click event. I understand that there is no such thing as "click" events in wxWidgets from the question…
Chris Andrews
  • 1,881
  • 3
  • 21
  • 31
5
votes
2 answers

The right way to find the size of text in wxPython

I have an application I am developing in wxPython. Part of the application creates a large number of TextCtrls in a grid in order to enter four-letter codes for each day of the week for an arbitrarily large list of people. I've managed to make it…
TPDMarchHare
  • 135
  • 1
  • 8
4
votes
1 answer

Hiding Vertical Scrollbar in wx.TextCtrl

I have a wx.TextCtrl that I am using to represent a display with a fixed number of character rows and columns. I would like to hide the vertical scrollbar that is displayed to the right of the text pane since it is entirely unnecessary in my…
Brandon E Taylor
  • 24,881
  • 6
  • 47
  • 71
3
votes
1 answer

Why does the caret disappear from a TextCtrl widget after a focus event?

I'm writing a calculator application on MS Windows 8.1 using wxPython-Phoenix in which I'd like the calculation to be performed as soon as the user enters a value into one of the parameter fields. To achieve that I'm using wx.EVT_KILL_FOCUS…
Ori
  • 33
  • 4
3
votes
1 answer

wxTextCtrl new line issues

I'm fighting against an anoying problem with my wxTextCtrl. Whatever I try, there is no way to add a new line. wxTextCtrl diplay a square character instead of a new line. Here is the relevant code : wxTextCtrl * detail = new wxTextCtrl…
Bastien
  • 994
  • 11
  • 25
2
votes
2 answers

How to get chars that are actually displayed in wx.TextCtrl?

I am trying to underline some specific words in single line wx.textctrl. I'm doing it by calculating position of a word in the control using GetTextExtent and drawing lines using wx.ClintDC. My problem begins when text in TextCtrl is longer then…
Wujek Brulion
  • 61
  • 1
  • 5
2
votes
2 answers

Changing the colour of a wxTextCtrl when Enabled=False

Is there a way to change the colour of a wxTextCtrl when it is disabled or another way to lock the control for input when it is enabled? I don't like the gray text on a gray background, with a gray border, it makes the information inside the control…
hennep
  • 545
  • 4
  • 12
2
votes
0 answers

Determine if textCtrl is scrolled to the end of the buffer

I have a wxTextCtrl element and I want to determine whether it is vertically scrolled to the bottom of the text buffer. It would appear that the functions GetScrollPos and GetScrollRange in combination with GetScrollThumb to get the number of…
devtk
  • 1,999
  • 2
  • 18
  • 24
2
votes
3 answers

How to scroll to the bottom of a wxTextCtrl and redraw screen

I have a wxTextCtrl with many lines of text with scrollbars enabled. Inside an event, I'd like to scroll to the end of the control and redraw the control. Here's what I have: def event_scroll_to_end(self, event): …
devtk
  • 1,999
  • 2
  • 18
  • 24
2
votes
1 answer

How to grow the size of the tree control when the child item count increases

I have a scrolled window and I am placing multiple tree control in the scrolled window. When ever i add more child items to the root of any treectrl it creates a scrollwindow to make sure all child will be accessible. What i need to achieve is…
StraightCirle
  • 182
  • 2
  • 12
2
votes
1 answer

Non-editable text box updated in real time from a wxSlider in wxPython

I want to create a non-editable text box with no cursor in wxPython. I want it to get updated in real time depending on the values from the wxSlider. The box will basically have a quadratic equation whose coefficients should change depending on the…
Karup
  • 2,024
  • 3
  • 22
  • 48
2
votes
1 answer

C++ Event (Focus) Handling

Due to comments I added the following code (in BasicPanel) Connect(CTRL_ONE, wxEVT_KILL_FOCUS, (wxObjectEventFunction)&BasicPanel::OnKillFocus); Connect(CTRL_TWO,wxEVT_KILL_FOCUS, (wxObjectEventFunction)&BasicPanel::OnKillFocus); Connect(CTRL_THREE,…
Wallter
  • 4,275
  • 6
  • 29
  • 33
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
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
1 answer

Why is wxTextCtrl so slow at displaying text?

I have a wxTextCtrl and I need to put a very large string into it. (Like a 15 MB string) The only problem is it's very slow. Here is what I'm doing: char * buff = ... wxString data(buff, wxConvUTF8); text->ChangeValue(data); However, this is not…
Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
1
2 3 4 5 6 7