![]() |
Forum Index : Microcontroller and PC projects : Spinbox problem...
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Hi folks. ![]() This code works: GUI spinbox #1,225,170,200,50,RGB(white),RGB(black),1,1,15 ...but this code does not: GUI spinbox #1,225,170,200,50,RGB(white),RGB(black),1,10,15 IE: Setting the minimum number for the box(ten in this example) results in the spinbox only working in the increment direction, decrement touch arrow is unresponsive. This is an issue ONLY until you get PAST the minimum. So, in the example code above, the 2nd code example DOES work, but you have to manually press(or press-and-hold) the up arrow on the spinbox till it is past ten, before the down-arrow will respond. The initial value of the spinbox is zero instead of what you selected as the minimum, in other words, and you have to spin past the minimum number as a first step, before you can use the down arrow. Smoke makes things work. When the smoke gets out, it stops! |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Yes, good point. What you should do is set the initial value in your program: GUI spinbox #1,225,170,200,50,RGB(white),RGB(black),1,10,15
CtrlVal(#1) = 10 But I agree, the initial value should be forced into the operating range. Geoff Geoff Graham - http://geoffg.net |
||||
Bizzie Senior Member ![]() Joined: 06/07/2014 Location: AustraliaPosts: 192 |
This may be changing the subject slightly but it's on spin boxes. I think the up and down arrows are wrong way round. My mind expects the lower button to be on the left just like any other number line or graph. Rob White |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
That would be easy to change. Does anyone else agree (or disagree) ? Geoff Graham - http://geoffg.net |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 1003 |
I just played with these. I instinctively went right to get it to go up, so I agree with the idea to swap these. regards Gerry Latest F4 Latest H7 FotS |
||||
paceman Guru ![]() Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
I haven't used the spinbox in a project as yet but I remember trying it out a while ago and instinctively went to the wrong side as well - so I think swapping them is a good idea too. Greg |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
I've never actually noticed any problem, as I follow the direction the arrow icon is pointing, but I am happy with it either way. I did not think about setting the ctrlval first - bah - must have missed that bit in the manual. If that is a satisfactory way to do it(set the ctrlval first), then nothing needs to change there, but a little mention or reminder that you have to do that in the manual would help. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
plover![]() Guru ![]() Joined: 18/04/2013 Location: AustraliaPosts: 306 |
A bit off topic but yet 'spinbox' related. Just got a Colour Maximite assembled this week, came with MMBasic v 4.0 I have just upgraded to MMBasic v4.5 and reading some posts. I got a bit curious about 'spinbox' and opened the Language Manual accompanying the update. I did a search on 'spinbox' but I did not get any hits?? I do use PCLinuxOS and perhaps this is the problem. ![]() |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Not available on the Maximites at this stage. The GUI objects are on the soon-to-be-released Micromite Plus. Jim VK7JH MMedit |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2944 |
@geoff, Expanding on the initial 'issue' posted, I think there is a related SpinBox issue. With a spinbox configured, going to either end (i.e. up to max, or down to min) by pressing AND holding down the 'arrow' will 'randomly' lock up the SpinBox control. Sometimes it works well; I simply hold the Down arrow and it goes from Max to Min, then press & hold the Up arrow for Min to Max. I can repeat this several times but then at some time it sure locks up. All other elements of a program continue to work. This is being observed on a 100pinner with your last supplied Beta to me with just 3 lines of code (have an ILI9341 TFT connected): Font #5
GUI spinbox #1,10,20,200,40,RGB(red),RGB(yellow),5,45,90 CtrlVal(#1)=200 I know in the above example I have set an initial value (200) exceeding the Max spinbox value of 90, this is just part of my testing. Setting it to a 'valid' value (i.e. between 45 and 90), or a below the minimum value (ie <45) still locks up the control. When the control 'locks', the arrow being pressed takes on a filled triangle in the 'foreground' colour (i.e. red in the above code example) Regarding the arrows; I would tend to agree that decreament should be on the left rather than the right. WW |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
I also agree http://rittle.org -------------- |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Thanks Phil, it will be fixed in the next release. Geoff Geoff Graham - http://geoffg.net |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |