Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:12 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Spinbox problem...

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 09:51pm 07 Jan 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 3292
Posted: 03:12am 08 Jan 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 192
Posted: 09:53am 08 Jan 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 3292
Posted: 11:45am 08 Jan 2016
Copy link to clipboard 
Print this post

  Bizzie said  I think the up and down arrows are wrong way round.

That would be easy to change. Does anyone else agree (or disagree) ?
Geoff Graham - http://geoffg.net
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 01:25pm 08 Jan 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 1329
Posted: 05:16pm 08 Jan 2016
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9610
Posted: 07:53pm 08 Jan 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 306
Posted: 09:23pm 08 Jan 2016
Copy link to clipboard 
Print this post

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. Edited by plover 2016-01-10
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:42pm 08 Jan 2016
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2944
Posted: 11:58pm 08 Jan 2016
Copy link to clipboard 
Print this post

@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 Kingdom
Posts: 671
Posted: 12:07am 09 Jan 2016
Copy link to clipboard 
Print this post

I also agree
http://rittle.org

--------------
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 03:27am 09 Jan 2016
Copy link to clipboard 
Print this post

  WhiteWizzard said  but then at some time it sure locks up.

Thanks Phil, it will be fixed in the next release.

Geoff
Geoff Graham - http://geoffg.net
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025