Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:37 11 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 : Make DISPLAYBOX Touchable?

Author Message
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1116
Posted: 02:24am 17 Jun 2018
Copy link to clipboard 
Print this post

In playing with GUI displays, I needed to have a series of blocks with predefined text to act as menu select boxes. I achieved this by using DISPLAYBOX then overlaying the same screen region with an AREA command and using the touch generated by the AREA command to do the menu selection.

While this works, it means I am using up 2 CTRLs for every menu box. Would it be possible to consider making the DISPLAYBOX touchable in the same way the AREA box is touchable?

Would anyone else find this usefull?

panky

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 07:14am 17 Jun 2018
Copy link to clipboard 
Print this post

I did the same with a couple of projects I was playing with
Yes I'd find it useful
But I suspect there's a reason Geoff hasn't done this already
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 10:11am 17 Jun 2018
Copy link to clipboard 
Print this post

It should be doable and sounds useful as well. I will add it to the list for possible inclusion in the next version.

Geoff
Geoff Graham - http://geoffg.net
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 10:24pm 17 Jun 2018
Copy link to clipboard 
Print this post

I've done a similar thing in the Tabbed displays I played with a while back.

I used the GUI SWITCH to create the 4 Tabs, or buttons at the top of the screen.

  Quote   'Heading Buttons - Page 9 is Switches across the top.
GUI SETUP 9
GUI Switch SwT1, "Home Page", MM.HRes/4*0,0,MM.HRes/4-2,TabHgt, RGB(Cyan),RGB(Gray)
CtrlVal(SwT1)=0
GUI Switch SwT2, "2nd Page",MM.HRes/4*1,0,MM.HRes/4-2,TabHgt, RGB(White)
CtrlVal(SwT2)=1
GUI Switch SwT3, "3rd Page",MM.HRes/4*2,0,MM.HRes/4-2,TabHgt, RGB(White)
CtrlVal(SwT3)=1
GUI Switch SwT4, "Full Detail",MM.HRes/4*3,0,MM.HRes/4-2,TabHgt, RGB(White)
CtrlVal(SwT4)=1




Most of the details are in this thread, but not sure the full code is the latest, as I haven't touched it for over a year.

Phil.

Edit, it's the 4 buttons along the top as seen here.


Edited by Phil23 2018-06-19
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 10:42pm 17 Jun 2018
Copy link to clipboard 
Print this post

  Geoffg said   It should be doable and sounds useful as well.


Don't know what is & isn't doable at your end, but maybe enhancements could be to GUI SWITCH.

One that come to mind, not considering if they would be useful or not are:

Round corners.
Latching or Momentary option.
Option for different colour when latched.
And option to changing the display text.

So this line of code for example,

  Quote  GUI Switch sw_pmp, "On|Off", 20, 90, 150, 50, RGB(white),RGB(Brown)
CtrlVal(sw_pmp) = 1
' the flow rate display box


Could just display the word on against a green button, and Off against a red button when it's value is changed.


Cheers

Phil.

Edit:- Should have said a variation on the line of code above that specifies different options.
Edited by Phil23 2018-06-19
 
Bizzie
Senior Member

Joined: 06/07/2014
Location: Australia
Posts: 192
Posted: 11:08pm 17 Jun 2018
Copy link to clipboard 
Print this post

I agree with Phil.

All Phil's enhancements would be good.

Cheers

Rob
Rob White
 
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