I'm new to GUI programming and just making my first steps in wxPython. As every newbie I'm running against walls, but the wxPython Demo are really, really helpful.
However, as for now some questions remain:
Is it possible to tell a TextCtrl widget: 'Please color all digits you receive (using AppendText() for instance) in red.'? How? And even more basic: What is the syntax to change the font setting for a TextCtrl field? I've tried and tried but cannot do it. What I finally what to achieve is something like: Set flag 1 and send string, it gets displayed in style 1, set flag 2 results in display style 2, and so on ...
The second part concerns icons in a wx.MessageDialog: What is necessary to display icons? If a message dialog is raised like this: mss = wx.MessageDialog(self,"bla bla","ERROR",wx.OK) - what must I do to display an standard error icon, for instance?
I understand that parts of this must be very simple to some of you, but I would already very much appreciate if you could point me at least on the right document (which I probably just overlooked).
I'm new to GUI programming and just making my first steps in wxPython. As every newbie I'm running against walls, but the wxPython Demo are really, really helpful.
However, as for now some questions remain:
Is it possible to tell a TextCtrl widget: 'Please color all digits you receive (using AppendText() for instance) in red.'? How? And even more basic: What is the syntax to change the font setting for a TextCtrl field? I've tried and tried but cannot do it. What I finally what to achieve is something like: Set flag 1 and send string, it gets displayed in style 1, set flag 2 results in display style 2, and so on ...
Look at the wxTextCtrl Styles in the wxTextCtrl section of the documentation.
The second part concerns icons in a wx.MessageDialog: What is necessary to display icons? If a message dialog is raised like this: mss = wx.MessageDialog(self,"bla bla","ERROR",wx.OK) - what must I do to display an standard error icon, for instance?
Add one of the wx.ICON_* styles to your wx.OK style.
Christian Meesters <cmeesters@ucdavis.edu> writes:
Hi
I'm new to GUI programming and just making my first steps in wxPython.
As every newbie I'm running against walls, but the wxPython Demo are
really, really helpful.
However, as for now some questions remain:
Is it possible to tell a TextCtrl widget: 'Please color all digits you
receive (using AppendText() for instance) in red.'? How? And even more
The second part concerns icons in a wx.MessageDialog: What is necessary
to display icons? If a message dialog is raised like this: mss =
wx.MessageDialog(self,"bla bla","ERROR",wx.OK) - what must I do to
display an standard error icon, for instance?
I understand that parts of this must be very simple to some of you, but
I would already very much appreciate if you could point me at least on
the right document (which I probably just overlooked).