[wxPython] Background color in wxTextCtrl & wxMiniFrame topics

Hello again,

on my adventures through the wxPython world, I encountered following
scenario: while trying to direct some output from a pipe into a
wxTextCtrl, I came across three rather simplistic (and almost
cosmetical) problems. [compared to the memory leaking stuff ;-)]

First I thought, putting the wxTextCtrl on an wxMiniFrame would look
rather cool. But wxMiniFrame seems to be meant different, since it
drag the box in some unusual fashion.

Secondly, I tried to set the background of the wxTextCtrl to standard
gray to show the user: this is just an informal display, but failed.

Third, when creating the wxFrame with the only style flag wxCAPTION,
I get the all icons, but the maximizer, not as expected, only the
closer.

[ia32, linux 2.2.16, KDE 1.2, wxGTK 2.2.2, wxPython 2.2.1]

May some enlightened mind put an eye on the attached code.

Would also like to read some comments on the piping stuff & cleanup.

Thanks for listening

hp

P.S.: attached code covers timer controlled output redirection with
      python pipes in modeless dialogs.

wxTxtCtrlBG.py (6.92 KB)

···

--
When I originally designed Perl 5's OO, I thought about a lot of this stuff,
and chose the explicit object model of Python as being the least confusing. So
far I haven't seen a good reason to change my mind on that.
  -- Larry Wall, 27 Feb 1997 on perl5-porters

AD: python 0.?: OO since the beginning of time

First I thought, putting the wxTextCtrl on an wxMiniFrame would look
rather cool. But wxMiniFrame seems to be meant different, since it
drag the box in some unusual fashion.

This is a bug. It should handle the dragging only when the mouse is on the title bar, not in the client area.

Secondly, I tried to set the background of the wxTextCtrl to standard
gray to show the user: this is just an informal display, but failed.

Seems to have something to do with the colour that is used. Don't know why yet but this works as expected:

    self.msg.SetBackgroundColour(wxRED)

Third, when creating the wxFrame with the only style flag wxCAPTION,
I get the all icons, but the maximizer, not as expected, only the
closer.

All wxGTK can do is set WM Hints about which controls to show on the caption. It is up to the WM to actually decide which to use or not.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

Robin Dunn wrote:

>
> First I thought, putting the wxTextCtrl on an wxMiniFrame would look
> rather cool. But wxMiniFrame seems to be meant different, since it
> drag the box in some unusual fashion.

This is a bug. It should handle the dragging only when the mouse is on
the title bar, not in the client area.

Well, at least not on the controls... Should I write a bug report?

>
> Secondly, I tried to set the background of the wxTextCtrl to standard
> gray to show the user: this is just an informal display, but failed.

Seems to have something to do with the colour that is used. Don't know
why yet but this works as expected:

    self.msg.SetBackgroundColour(wxRED)

Thanks for the hint. While investigating it a bit further, it works
only as expected with colors != BackgroundColour.

> Third, when creating the wxFrame with the only style flag wxCAPTION,
> I get the all icons, but the maximizer, not as expected, only the
> closer.

All wxGTK can do is set WM Hints about which controls to show on the
caption. It is up to the WM to actually decide which to use or not.

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

BTW, Robin, your mailer produces very long lines.

G'day, hp

···

--
"Caution: Cape does not enable user to fly."
(Batman Costume warning label)

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

> >
> > First I thought, putting the wxTextCtrl on an wxMiniFrame would look
> > rather cool. But wxMiniFrame seems to be meant different, since it
> > drag the box in some unusual fashion.
>
> This is a bug. It should handle the dragging only when the mouse is on
> the title bar, not in the client area.

Well, at least not on the controls... Should I write a bug report?

Yes please.

BTW, Robin, your mailer produces very long lines.

Yep, I discovered that yesterday. It somehow got set to send text as MIME
quoted-printable instead of plain. Should be fixed now.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users