Greetings,
I have some simple printing I need to do from Python
on Windows, so I opted for the excellent PyCDC methods.
I got stumped when I realized that I actually needed
something other than left-justified printing for this
project. PyCDC.DrawText appears to offer what I need,
but the doc at:
says:
_______________ __________
PyCDC.DrawText
s,rc,forat = DrawText()
Formats text in the given rectangle
Return Value
Height of text in pixels
_______________ __________
This looks more than a little odd to me.
For one, the text specifies what is probably
a return type of int (height in pixels),
but the template (s,rc,forat = DrawText())
shows a totally different type of return.
Additionally, DrawText apparently takes no
aguments. Very odd.
I would have expected something more like
the DrawFrameContro l doc, which looks like
this:
_______________ ___________
PyCDC.DrawFrame Control
DrawFrameContro l(rect, typ, state)
Draws a frame control of the specified type and style.
Parameters
rect : (left, top, right, bottom)
Specifies the bounding rectangle, in logical units.
typ : int
state : int
MFC References
CDC::DrawFrameC ontr
_______________ ___________
Does anyone out there have an example of
using DrawText to right or center justify
text? And who do I contact regarding the
suspect doc?
Many thanks,
Conrad
Comment