From: John L. <jla...@gm...> - 2005-06-25 20:23:45
|
On 6/25/05, The Doctor <the...@bl...> wrote: > A couple of things came up in the last two days: > One is wx.wxSYS_COLOR_HIGHLIGHT or any other system colour. I found I cou= ld specify wxColour(nnn,nnn,nnn), but I can't substitute any system colour,= wxLua complains of an unexpected user defined data type if I try this. I a= lso wonder if there are ever issues with color and colour. I've tested a co= uple in other contexts and found it will take either, which is cool. wx.wxSYS_COLOR_HIGHLIGHT (a number IIRC) is meant for wxSystemSettings. local c =3D wx.wxSystemSettings.GetColour(wx.wxSYS_COLOR_HIGHLIGHT) -- the above errors out since there's no constuctor for wxSystemSettings... print("%d %d %d", c.Red(), c.Green(), c.Blue()) I think it's impossible to get at them since static methods aren't handled properly. They need to be added to the wrappers as "LuaGlobal" with a name of something like "wxSystemSettings_GetColour". I'm sorry that we're deadlocked currently, I can't work on or test this until we get a working wrapper system. Maybe another week or so. > Another thing I haven't found a way to do is make a popup menu that appea= rs if a button is clicked. I tried till I got confused, and all I can say i= s that nothing worked, and the variety of error reports was dazzling. :) local popMenu =3D wx.wxMenu() -- add normal menu items -- to position the menu for a button use local rect =3D mybutton.GetRect() to find the bottom left. mywindow.PopupMenuXY(popMenu, mouseEvt.GetX(), mouseEvt.GetY()) Regards, John Labenski |