Hi,
Ryan Pusztai wrote:
>
>
> On 1/22/07, *Hakki Dogusan* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> wrote:
>
> Hi,
>
> (I don't know whether it is different for wxluafreeze but,)
>
> I'm using like:
>
> local bitmap = GetImage("dsbw")
> local icon = wx.wxDefaultIcon()
> icon:CopyFromBitmap(bitmap)
> app.frame:SetIcon(icon)
> bitmap:Delete()
> icon:Delete()
>
> Taken from wxLua's samples
>
>
> This was close, but I still can't get the frame icon to change. I can
> use the bitmap created by the code above in a wxBitmapButton, but
> nothing happens to the frame icon. I also tried to wxLua smaples that
> set the frames icon and they didn't work either. The samples are
> wxluasudoku.wx.lua and calculator.wx.lua.
> --
> Regards,
> Ryan
> RJP Computing
>
>
Could it be a size/image/etc. problem?
My "dsbw" icon is a xpm file generated
from a real icon.
Related code follows:
local dsbw_xpm = {
"32 32 12 1",
" c None",
". c Blue",
"X c DarkSlateGray",
"o c Yellow",
"O c Red",
"+ c Gray60",
"@ c #999900",
"# c Gray100",
"$ c Cyan",
"% c #990099",
"& c Gray80",
"* c Green",
" . ",
" XX X. ",
" XX X ",
" XX o . ",
" XX O + X ",
" XX [EMAIL PROTECTED] +#+ . ",
" XX [EMAIL PROTECTED]@O + X ",
" XX [EMAIL PROTECTED]@O . . ",
" X X [EMAIL PROTECTED]@O .$. X ",
" X X [EMAIL PROTECTED] .$#$. . ",
" X X O O .$. XX ",
" X X OoO . XX. ",
" XX X O XX+X ",
" XXoX X % XX++++. ",
"X#oooX X XX++++&#XX ",
"Xo#oooX X XX++++&#XX. ",
"Xoo#oooX XXX++++&XXXoX*X ",
"Xooo#oooX X++++&XXooooXX*. ",
" Xooo#oooX X++&XXooooXXX***X ",
" Xooo#oooXX&XXooooXX+X*****. ",
" Xooo#oooXXooooXX++++X*****X ",
" Xooo#ooooooXX++++&#XX****X. ",
" Xooo#oooXX++++&#XX****X. ",
" Xooo#XX++++&#XX****XX+. ",
" XooX++++&#XX****XX++++X ",
" XoX++&#XX****XX++++&&X. ",
" XX&#XXXX**XX++++&#X. ",
" XXXX**XXX++++&#X. ",
" X**X++++&#X. ",
" X*X++&#X. ",
" XX&#X. ",
" XX. "}
-----------------------------------------------------------------------------
function GetImage(name)
if name == "dsbw" then
return wx.wxBitmapFromXPMData(dsbw_xpm)
elseif name == "add" then
return wx.wxBitmapFromXPMData(add_xpm)
elseif name == "cancel" then
return wx.wxBitmapFromXPMData(cancel_xpm)
elseif name == "delete" then
return wx.wxBitmapFromXPMData(delete_xpm)
elseif name == "ok" then
return wx.wxBitmapFromXPMData(ok_xpm)
else
error("unknown image name")
end
end
-----------------------------------------------------------------------------
--
Regards,
Hakki Dogusan
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users