I don't understand this. Why re-invent a good wheel? All I am concerned with is using it, and trying to resist further breakage by coders who seem not to realise how useful its current behaviour is.
Take a look at the small example I made, with four SpinCtrl's. There are several inbuilt native behaviours that I like there. 1. Click inside a SpinCtrl, then crank the mousewheel a bit. 2. Click inside a SpinCtrl, then use arrow keys, including held arrow keys. 3. Double-click in a SpinCtrl, type a single digit, hit Enter... 4. (Important). Click, scroll, or up-arrow to top of range, notice that unlike with SPIN_CTRL_UPDATED (which used to work this way too, once), the symbolic text remains shown when the range limit is hit, even though no update signal is sent for us to respond to now. 5. Use Ctrl+Enter to 'tab' to the next SpinCtrl, Enter a single digit, which correctly causes symbolic text update even though the text is still there during entry. Actually this is weird, it only works if the FIRST characters form a valid integer, which works because the cursor defaults to string start. There could be more details I missed, but what matters is that there are lots of small and helpful details in SpinCtrl that make it excellent for fast data entry tasks, as well as numerically indexing editable tables of complex data types. For real-world interfacing between collections of items, and the numeric world in a computer, the SpinCtrl AS IT IS, barring further breakages, is second to none. Writing it from scratch is a big ask. I dare say it is worth the effort, but all I want is to see the original working, and not broken any further. It's dangerously close to becoming useless unless these points are recognised and understood by everyone in control of coding it. Andre Arpin <ar...@kingston.net> wrote: (01/01/2011 18:25) > >Replacing the wxTexCtrl by any kind of window should work. > >local baseID = wx.wxID_HIGHEST + 1 >frame = wx.wxFrame(wx.NULL,wx.wxID_ANY, 'Test spin control') > >local function GetChild(event, index, controlType) > local wlist = event:GetEventObject():DynamicCast("wxWindow"):GetParent >():GetChildren() > return wlist:Item(index):GetData():DynamicCast(controlType) >end > >local function spinEvt(event) > local spinButton = event:GetEventObject():DynamicCast("wxSpinButton") > local textControl = GetChild(event, 0, "wxTextCtrl") > textControl.Value = tostring(spinButton.Value) >end > >local function textEvt(event) > local textCtrl = event:GetEventObject():DynamicCast("wxTextCtrl") > local spinButton = GetChild(event, 1, "wxSpinButton") > local number = tonumber(textCtrl.Value) > if number then spinButton.Value = number end >end > >function GetSpin(id, position) > local spinner = wx.wxControl(frame, id, position, wx.wxSize(100,50)) > local tc = wx.wxTextCtrl(spinner, id, 'text', wx.wxPoint(0,0),wx.wxSize >(50,50)) > local sc = wx.wxSpinButton(spinner, id, wx.wxPoint(50,0), wx.wxSize(50,50)) > sc:Connect(wx.wxEVT_SCROLL_LINEDOWN, spinEvt) > sc:Connect(wx.wxEVT_SCROLL_LINEUP, spinEvt) > tc:Connect(wx.wxEVT_KEY_UP, textEvt) > return spinner >end > >local sp = GetSpin(baseID, wx.wxPoint(0,0) ) >sp = GetSpin(baseID + 1, wx.wxPoint(0,75)) > >frame:Show(true) > >Andre > > >------------------------------------------------------------------------------ >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 ------------------------------------------------------------------------------ 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