13.17 Spinner Control
Cliquez içi pour plus de vidéos disponibles sur notre chaine youtube !Hello, everyone in this video, we will see the "spinner". The Spinner is similar to ComboBox, which allows users to choose the set of values. Similarly to ComboBox, Spinners can modify, it also allows users to add values. Unlike ComboBox, Spinner, which has no drop-down list, only displays the current value. It is often replaced ComboBox when the set of values can be very large. Well, we just start by typing the name which is "Spinner". there will be a rowIndex = 2 and columnIndex = 4 We can also set a minimum and maximum range min = 0 and max = 100 as with the slider And now, if we execute this. You can see here now with the "spinner". It can actually specify a staff in which we can be quite precise unlike the slider. But obviously the advantage is that it’s much more accurate, so if you wanted to enter a specific value and there’s a maximum of 100. So obviously, if we wanted to make a value like 92 for example, we couldn’t really do that with the slider. Because we need more precision so the spinner also allows us to be a little more precise. Now, if you notice for the moment we can’t type in, it would be nice if we could actually type in a number, if we knew what the number was, we can do it. And the way to do that is to simply define the "editable" property so that it is equal to true. So, if I make editable equal to "True" we can go ahead and type a number. If we rerun the program now we can type numbers. Notice when I type a number beyond the maximum, it will only select the maximum. I cannot go beyond 100. Another thing we can do with the "spinner" is that we can set the initial value. This can be very convenient in this case if you set a minimum and maximum range to set an initial value, for example halfway. So we’ll do initialValue = 50 and run the program again. Now you see that we have a default value that starts at 50. That was all for the spinner in the next, let’s see the ColorPicker which is the color selector Go! I tell you next time!