Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:33 14 Nov 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 : GUI DROPDOWN?????

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9755
Posted: 09:03pm 12 Jan 2017
Copy link to clipboard 
Print this post

Are there any plans to have a dropdown box GUI control sometime in the future?

They work the same way as any other GUI control, but there is a list of options you can choose one from - I am sure 99% of you know what a dropdown box is......

You could store the data to show in the list in a simple one-dimensional array, so that pseudo-code would be like:

GUI DROPDOWN #1,LST$(),StartX,StartY,ListSize,Justify,Fcolour,Bcolour

....with ListSize being the size of the dropdown box when selected, NOT the number of items contained in the list.

You could define what you wanted the list to have in it with the likes of DIM LST$(10) LENGTH 15 kind of idea, and store the items for the dropdown list within that simple array: LST$(1)="Option 1":LST$(2)="Line 2":LST$(3)="Line 3" - that kind of idea or similar.

A dropdown box or scrolling box is about the only GUI control missing at the moment.

This may well be much more difficult then I think it is, to code, animate and to have MMBASIC manage in the background, compared to the existing controls.

Thoughts?
Comments?Edited by Grogster 2017-01-14
Smoke makes things work. When the smoke gets out, it stops!
 
RonnS
Senior Member

Joined: 16/07/2015
Location: Germany
Posts: 121
Posted: 09:32pm 12 Jan 2017
Copy link to clipboard 
Print this post

hi,

this would be my favorite too, it should remind me of the old "Amiga" times: on Menu goto lol
but take a look a this
http://www.thebackshed.com/forum/forum_posts.asp?TID=7819&KW=Ronns

Ron
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2959
Posted: 09:49pm 12 Jan 2017
Copy link to clipboard 
Print this post

This is a great idea but I can see people wanting more and more features with the drop-down (which possibly need to be considered when designing such a GUI control)

For example;
- Which element to show initially in the 'unselected' dropdown text area (maybe specify as 'x' in the LST$(x) pointer)
- Pixel width (dangerous to auto create depending on maximum data length in LST$())
- Foreground/background colours to highlight current selection when dropdown shows (could simply be the colours inverted)
- Font size (may need to be different from current font - possibly FONT prior to GUI DROPDOWN)

I am NOT saying these have to be in - just that it needs to be a well defined syntax to begin with; hence some ideas included above).

Also, what about numeric as opposed to string - so LST$(x) is simply LST(X) if numeric.

This has very much got my vote too - not time to rest just yet Peter!

 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9755
Posted: 11:49pm 12 Jan 2017
Copy link to clipboard 
Print this post

I was thinking that the list to show via the control, could be anything - including numbers(stored as ASCII) if that was what you wanted. Easy to convert them into "Real" numbers with something like NUM=VAL(CTRLVAL(DROPDOWN)) kind of thing, and if you want ASCII, just read the control directly.

I am just throwing the idea about - certainly not lamenting it not being there or anything, but now with talk of MOUSE CONTROL being a possibility in the near future, dropdown boxes could be really useful.

Thinking about this a little more, you would drop the ListSize part of the control.
It would be easiest to just have the list drop down the same number of lines to choose from - that's what even modern ones do, so......
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 02:49am 13 Jan 2017
Copy link to clipboard 
Print this post

Yes, a dropdown box (and a circular gauge) must be part of the core group of controls. Both have been on my wish list for some time but there have been lots of distractions (many worthwhile) - the whole Micromite world has been growing and consuming time.

Grogs, your outline sounds very much like the perfect spec. It is on the "features to implement" list.

Geoff
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9755
Posted: 01:36pm 13 Jan 2017
Copy link to clipboard 
Print this post

Owwwwwww - awesome.
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9755
Posted: 09:24am 23 Aug 2020
Copy link to clipboard 
Print this post

Came across this thread tonight while searching for something else.
Did this ever get implemented?
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 12:27pm 23 Aug 2020
Copy link to clipboard 
Print this post

No, sorry.  I tried but I could not get a dropdown list to work in a reliable way.  It needed too many graphical elements (such as a scrolling list) that were next to impossible to operate with a blunt finger.

Geoff
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9755
Posted: 01:49am 25 Aug 2020
Copy link to clipboard 
Print this post

OK. Thanks.  
I won't plan on using that in the future then.
Smoke makes things work. When the smoke gets out, it stops!
 
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