Hi,
LOL, no I did not connect those events ^_^, and most certainly not a
stupid question.
However, it still doesn't work! Only thing that changed is that now the
panel isn't visible any more, there's only the dark gray background of
the frame.
~ Kenneth
Hakki Dogusan wrote:
> Hi,
>
> Kenneth Forsbäck yazmış:
>> Hi,
>>
>> yes, I've looked through scribble.wx.lua, but since I didn't get it to
>> work, I just ignored it and tried something else.
>>
>> here's the actual source I'm working with, and not just a generic example:
>>
>> ----------------------------------------
>> instanceAbout.lua
>> ----------------------------------------
>>
> [snipped]
>
> May I ask a stupid question, did you connent event?
>
> panel:Connect(wx.wxEVT_PAINT, OnPaint)
> panel:Connect(wx.wxEVT_ERASE_BACKGROUND, function(event) end) -- do nothing
>
>
> --
> Regards,
> Hakki Dogusan
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> wxlua-users mailing list
> wxlua-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxlua-users
-- define instanceAbout
instanceAbout = wx.wxFrame(
instanceSource,
wx.wxID_ANY,
"About Robin Studio",
wx.wxDefaultPosition,
wx.wxSize(300, 400),
wx.wxCAPTION + wx.wxSTAY_ON_TOP + wx.wxFRAME_NO_TASKBAR)
-- centre instanceAbout
instanceAbout:Centre(wx.wxBOTH)
-- define aboutBackground
local aboutBackground = wx.wxBitmap(
"interface/about/aboutBackground.bmp",
wx.wxBITMAP_TYPE_BMP,
300, 400)
-- define aboutPanel
local aboutPanel = wx.wxPanel(
instanceAbout,
wx.wxID_ANY,
wx.wxDefaultPosition,
wx.wxSize(300, 400))
-- define OnPaint
function OnPaint(event)
local dc = wx.wxPaintDC(aboutPanel)
if aboutBackground and aboutBackground:Ok() then
if redrawRequired then
DrawBitmap(aboutBackground)
redrawRequired = false
end
dc:DrawBitmap(aboutBackground, 0, 0, false)
end
dc:Delete() -- clean up
end
-- connect events
aboutPanel:Connect(wx.wxEVT_PAINT, OnPaint)
aboutPanel:Connect(wx.wxEVT_ERASE_BACKGROUND, function(event) end) -- do nothing
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users