Hello everyone,
I want to find way to remove / breaking limit of attribute Spinmin and Spinmax 
of iup control - Text with Spin attribute.


Although user could input (directly, not by spin button) or paste any value, it 
will affect control's Value attribute. But the control's Spinvalue attribute is 
limited at Spinmin or Spinmax, which would be used by spin.
Means you paste -100, it turns to 0 on click spin-down, and 1 on click spin-up, 
Their default value is Spinmin - 0 and Spinmax - 100..


Currently, I use valuechanged_cb to change Spinmin, Spinmax to follow Value. 
Like:
        i.text{spin = 'YES', 
        valuechanged_cb = 
                function(self)
                        local value = self.value
                        local spin_increment = 20
                        if(self.spinmin >= value)then
                                self.spinmin = value - spin_increment
                        elseif(self.spinmax <= value)then
                                self.spinmin = value + spin_increment
                        end
                        self.spinvalue = value
                end,
        }       could use 'tonumber' first to check value, if it is a number 
then it could be used for spinvalue.

        'spin_increment ' should bigger than 20, for "In Windows, the increment 
is multiplied by 5 after 2 seconds and multiplied by 20 after 5 seconds of a 
spin button pressed."






So, any ideas?
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to