I know adding a wx.TextCtrl, with style including wx.T_MULTILINE will allow me to use a text box control with multi-line capability, but, just wondering about easiest/simplest way/examples with regards to then determining current line, column, etc., as opposed to insertion point, which I presume is related to character cursor position, etc.?
And, not really worried about rich text formatting, but, pretty much just plain text, but, it might also include different source/value character encoding, and/or different forms of line break renditions, which is also why am wondering about line and character column numbers, etc.
TIA
Jacob Kruger
Blind Biker
Skype: BlindZA
“Roger Wilco wants to welcome you…to the space janitor’s closet…”
I’m not sure I understand the distinction you are trying to draw.
The “current line and column” are exactly the “insertion point”.
It’s the spot where new text will be inserted, whether by typing or
by API.
GetInsertionPoint gives you the byte number within the entire
string. PositionToXY converts that to column and row.
···
Jacob Kruger wrote:
I know adding a wx.TextCtrl, with
style including wx.T_MULTILINE will allow me to use a text box
control with multi-line capability, but, just wondering about
easiest/simplest way/examples with regards to then determining
current line, column, etc., as opposed to insertion point,
which I presume is related to character cursor position, etc.?
-- Tim Roberts, Providenza & Boekelheide, Inc.
timr@probo.com
Thanks - PositionToXY was pretty much exactly what was looking for - don’t know why hadn’t come across mention of it through a few searches, etc. - apparently hadn’t gotten wording just right…
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
“Roger Wilco wants to welcome you…to the space janitor’s closet…”
···
----- Original Message -----
From:
Tim Roberts
To: wxpython-users@googlegroups.com
Sent: Thursday, 01 May, 2014 7:04 PM
Subject: Re: [wxPython-users] Multi-line text editing
Jacob Kruger wrote:
I know adding a wx.TextCtrl, with style including wx.T_MULTILINE will allow me to use a text box control with multi-line capability, but, just wondering about easiest/simplest way/examples with regards to then determining current line, column, etc., as opposed to insertion point, which I presume is related to character cursor position, etc.?
I’m not sure I understand the distinction you are trying to draw. The “current line and column” are exactly the “insertion point”. It’s the spot where new text will be inserted, whether by typing or by API.
GetInsertionPoint gives you the byte number within the entire string. PositionToXY converts that to column and row.
-- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.