I need a text editor written with text draw calls

Mark Hahn mark at hahnca.com
Mon Sep 1 12:57:23 EDT 2003


I am using wxPython (wxWindows) and need a simple non-styled text control
with an arbitrary image background.  Since wx does not support transparent
colored backgrounds on controls, I'm being forced to use a simple pane with
a bitmap loaded and write the text directly over the bitmap with text
drawing calls.

Does anyone know of any existing python code that implements the logic of a
text control with direct calls to painting text on any canvas?  I am not
looking forward to writing this from scratch in this day and age.

I toyed around for a while with the idea of implementing an off-screen
control to a memory buffer and then converting the background color to a
mask to blit onscreen, but then I realized controls only work onscreen.
Then I thought of trying to use printing, but then found out controls can't
go to a printer.  Somebody somewhere in control heaven made the decision
that controls would be forever only present on monitors with opaque
backgrounds.  Talk about an assumed design decision somewhere...






More information about the Python-list mailing list