|
Forum Index : Microcontroller and PC projects : SpinBox
| Author | Message | ||||
| KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1945 |
I notice the following effect with an interaction between some GUI controls and a Message Box, but mainly the Spinbox. If the Spinbox is touched and a Message box opens before the Spinbox Touch is released, the spinbox partly locks. In the Simple code below, the "Change" button switches between a Control Touch press being acknowledged by Touch down or Touch up, it starts with Touch up and this allows the Spinbox to run correctly. Arm H7 - Latest MM.Basic release from Geoff and Peter, but it's been there for a long time. Using Touch UP as the Button Press detect solves the problem. But surely I'm not the only one who has noticed this, it's the same on all my H7 units and the E 100+. CLS DIM integer ButtonTouched,Change,Res Const SBOX = 5 Const BT_ReStart = 6 Const BT_Change = 7 GUI SPINBOX SBOX,MM.Hres/20,MM.Vres/2,MM.Hres/3,MM.Vres/6,RGB(WHITE),RGB(BLUE),1,1,5 GUI BUTTON BT_ReStart,"Restart",MM.Hres/1.4,MM.Vres/2,MM.Hres/5,MM.Vres/6,RGB(WHITE),RGB(BLUE) GUI BUTTON BT_Change,"Change",MM.Hres/2.2,MM.Vres/2,MM.Hres/5,MM.Vres/6,RGB(WHITE),RGB(BLUE) GUI Interrupt TouchDN,TouchUP Sub TouchDN() IF Change Then ButtonTouched = Touch(REF) End Sub Sub TouchUP() IF NOT Change Then ButtonTouched = Touch(LASTREF) End Sub DO IF ButtonTouched <> 0 Then HandleTouch() Loop SUB HandleTouch() Local as Integer ThisTouch ThisTouch = ButtonTouched Select Case ThisTouch Case SBOX Res = Msgbox("ERROR from something","OK") Case BT_ReStart CPU RESTART Case BT_Change if Change = 1 then Change = 0 GUI Bcolour RGB(BLUE),BT_Change else Change = 1 GUI Bcolour RGB(RED),BT_Change endif Pause 500 End Select ButtonTouched = 0 END SUB NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
Thanks, this could be a hard one to fix as the gui controls and the message box work in different ways. I will add it to the list for some serious thought. Geoff Graham - http://geoffg.net |
||||
| KeepIS Guru Joined: 13/10/2014 Location: AustraliaPosts: 1945 |
Thanks Geoff, although it's not a big deal once you are aware of the cause. Apart from GUI Hide, everything is just great, I'm running 187 GUI controls and 14 GUI Pages so eventually some obscure hiccup is likely to pop up, but MMBasic is still so dam stable. Mike. NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |