On Thu, Oct 22, 2009 at 3:28 AM, Michael Gerbracht <smartma...@arcor.de> wrote: > In article <a84984760910211220v4c3440e1yc86b654ae8010...@mail.gmail.com>, > John Labenski <jlaben...@gmail.com> wrote: >> On Wed, Oct 21, 2009 at 9:30 AM, Michael Gerbracht <smartma...@arcor.de> >> wrote: > > I store the data in lua anyway so this should not be a problem. Or changes > will just apply after a restart. Still I am not sure how to set the style > upon creation. I use the following code to create it: > > local tree = wx.wxTreeCtrl(this, wx.wxID_ANY,wx.wxPoint(0,0), > wx.wxSize(160,250),wx.wxTR_DEFAULT_STYLE + wx.wxTR_NO_LINES > + wx.wxTR_HIDE_ROOT + wx.wxTR_MULTIPLE + wx.wxNO_BORDER); > > The styles are separated by a "+" sign, which is not standard lua so I do not > know how to make a style optional. I tried to use a variable instead of > "wx.wxTR_NO_LINES" and set it to either nil or "wx.wxTR_LINES". Both fail. > One possibility might be to define two sets of styles, one including > "wx.wxTR_NO_LINES" and the other one not. This works if you only want to make > one style configuarable. > > Is there a better/more flexible way to define the styles?
These styles are simply numeric bit masks so that adding them together is the same as using a boolean OR operator on the numbers. Instead of setting it to nil set it to 0. wx.wxTR_LINES does not exist, I think you want wx.wxTR_LINES_AT_ROOT. http://docs.wxwidgets.org/stable/wx_wxtreectrl.html#wxtreectrl Regards, John ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users