On 7/30/06, Richard Simes <[EMAIL PROTECTED]> wrote: > I have just started writing a spreadsheet program in lua that supports > functions, cell ranges and sorting. have got to the point where it really > needs a user interface to be useable to anyone so am investigating wxLua.
Lua should make scripting arbitrary functions fairly easy. > How can I use a wxGrid in such a way that the value typed into a cell is not > the same as the value displayed? (if a function is inputted) This is probably best done using a lua table in addition to the wxGrid's "cell value" which is just the displayed string value. The lua table could store the values using a string represenation of the coords, eg. string.format("%d, %d", row, col). > I imagine i need to call grid:SetDefaultRenderer() > can a cell renderer object be defined from lua? As it's user-data, I suspect > this might not be possible? SetDefaultRenderer has been broken in wxWidgets for years, I submitted a patch quite some time ago, but I think it's been lost since. You can catch the events for set cell value and put them into a separate lua table and then write to the wxGrid what the output of the function or whatever was entered should be. I think this would be simplest and should be enough. > Help would be appreciated, though I suppose I should read up on wxWidgets a > bit more before I launch into this myself... The wxGrid component is hard to get a handle on at first glance, but hopefully since you don't have to compile as in C++ you can get something going fairly quickly. Regards, John Labenski ------------------------------------------------------------------------- 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 Wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users