Andre Arpin <ar...@kingston.net> wrote: (01/01/2011 00:43) >> Which is nice but I'd hoped it cut both ways. :) Sadly, while EV.Id neatly >replaces EV:GetId(), you can't do >> SC.Value=SC.Value.."text" to force text replacement in a SpinCtrl derived >directly from its own value, >> but you CAN do it with SC:SetValue(SC.Value.."text"). I guess I can either >use the dot for reading but not >> writing, or stay with Set and Get for symmetry... Both approaches seem >useful to me. >> > > > >I think they should be identical. >try > >frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, '') >tc = wx.wxTextCtrl(frame,1) >frame:Show(true) >tc.Value = 'a' >tc.Value = tc.Value .. ' 123' >
But now try this. :) frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, '') sc = wx.wxSpinCtrl(frame,1,"",wx.wxPoint(2,2),wx.wxSize(60,20),wx.wxSP_ARROW_KEYS+wx.wxTE_PROCESS_ENTER,0,10,5) frame:Show(true) sc.Value = 5 sc.Value = sc.Value .. " XYZ" --sc:SetValue(sc.Value .. " XYZ") Finally, retry by moving the -- to enable the :Get variant and comment out the dot variant on line 5. The dot variant causes SpinCtrl to panic because it is trying to directly address the internal value, not the text field. TextCtrl is purely a text field, which is why the difference wasn't revealed. ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users