On Tue, Mar 30, 2010 at 11:07 AM, John Labenski <jlaben...@gmail.com> wrote:
> On Tue, Mar 30, 2010 at 10:47 AM, Andreas Bittel <andreas.bit...@web.de> 
> wrote:
>>  Hello,
>>
>> I want to set the colour with:
>>     c = wx.wxColour(1,2,3)
>>     dc:SetPen(c)
>>
>> but receive the error in the subject. How can I set the colour for a pen?
>

Oh, I see the error message is in the title. Ok, the function you're
calling is wxDC::SetPen(const wxPen& pen) which means that it's
looking for a wxPen not a wxColour.

c = wx.wxColour(1,2,3)
p = wx.wxPen(c, 1, wx.wxSOLID)
dc:SetPen(p)
c:delete()
p:delete()

See:

http://wxlua.sourceforge.net/docs/wxluaref.html#wxPen

or better yet

http://docs.wxwidgets.org/stable/wx_wxpen.html#wxpen

Hope this helps,
     John

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to