hi,
is there a way to convert tab to spaces in wx.TextCtrl ?
hi,
is there a way to convert tab to spaces in wx.TextCtrl ?
and spontaneously,
Le jeudi 2 juillet 2015 09:27:27 UTC+2, NAIMI Fakhreddine a écrit :
hi,
is there a way to convert tab to spaces in wx.TextCtrl ?
Hi,
On 7/2/2015 9:27, NAIMI Fakhreddine wrote:
hi,
is there a way to convert tab to spaces in wx.TextCtrl ?
In the future you might want to expand/explain why you like something - it would most likely make it easier to help or give tips.
You probably could do it with wx.TextCtrl with a custom handler for EVT_CHAR, but you might want to look at the wx.RichTextCtrl or wx.StyledTextCtrl instead.
Werner
ok,
i’ve created a text editor so i can use it in my programme to ask the user to input text that i will use,
the text inputted should not have tabs (\t), and i want theses tabs to be converted to spaces spontaneaousyl when typing or the text being copy/pasted
thank you.
Le jeudi 2 juillet 2015 11:35:45 UTC+2, werner a écrit :
Hi,
On 7/2/2015 9:27, NAIMI Fakhreddine wrote:
hi,
is there a way to convert tab to spaces in wx.TextCtrl ?
In the future you might want to expand/explain why you like something -
it would most likely make it easier to help or give tips.You probably could do it with wx.TextCtrl with a custom handler for
EVT_CHAR, but you might want to look at the wx.RichTextCtrl or
wx.StyledTextCtrl instead.Werner
StyledTextCtrl is used by a few programs as editor (especially IDE's, like Editra, Boa ...), it would probably be a better match for your use case then TextCtrl, but I would also look at RichTextCtrl, I think it is targeted at at text editing.
Werner
On 7/2/2015 13:11, NAIMI Fakhreddine wrote:
ok,
i've created a text editor so i can use it in my programme to ask the user to input text that i will use,
the text inputted should not have tabs (\t), and i want theses tabs to be converted to spaces spontaneaousyl when typing or the text being copy/pasted
i’m on wxpython 2.6 i can’t import wx.richtext.RichTextAttr
Le jeudi 2 juillet 2015 14:34:56 UTC+2, werner a écrit :
On 7/2/2015 13:11, NAIMI Fakhreddine wrote:
ok,
i’ve created a text editor so i can use it in my programme to ask the
user to input text that i will use,the text inputted should not have tabs (\t), and i want theses tabs to
be converted to spaces spontaneaousyl when typing or the text being
copy/pastedStyledTextCtrl is used by a few programs as editor (especially IDE’s,
like Editra, Boa …), it would probably be a better match for your use
case then TextCtrl, but I would also look at RichTextCtrl, I think it is
targeted at at text editing.Werner
Hi,
On 7/2/2015 14:49, NAIMI Fakhreddine wrote:
i'm on wxpython 2.6 i can't import wx.richtext.RichTextAttr
wxPython 2.6 is very very very very old (about 8 years!!!), as you are starting with a project you should use wxPython 3.0x or at least nothing older then 2.8.12.1 which is by the way already 4 years old!
Werner
i’m in internship… i have to deal with it since i work with the company material
rhanks anyway
Le jeudi 2 juillet 2015 14:54:41 UTC+2, werner a écrit :
Hi,
On 7/2/2015 14:49, NAIMI Fakhreddine wrote:
i’m on wxpython 2.6 i can’t import wx.richtext.RichTextAttr
wxPython 2.6 is very very very very old (about 8 years!!!), as you are
starting with a project you should use wxPython 3.0x or at least nothing
older then 2.8.12.1 which is by the way already 4 years old!Werner
NAIMI Fakhreddine wrote:
is there a way to convert tab to spaces in wx.TextCtrl ?
This is a trickier operation than you might expect. How many spaces do
you expect it to be? Are you going to allow the user to set the tab
interval, or will it be fixed? And if your font is proportional, then
you can't really use spaces. You need to use inches or cm.
I'm just saying there may not be a simple answer; there are aspects to
this you need to think about.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
IIRC we used wx.stc for internal editor since wxPython v2.4
Niki
On 2.07.2015 18:35, NAIMI Fakhreddine wrote:
i'm in internship... i have to deal with it since i work with the
company material