Page 1 of 1

Touch Screen : BUTTON, IMAGE and LABEL

Posted: Wed Feb 16, 2022 11:53 am
by AUGE_OHR
hi,

for Touch Screen in want to make some "Button"
i want COLOR which does not exist in BUTTON or IMAGE only LABEL have Color Option

but ONCLICK of LABEL need "DblClick" to work ... not good for Touch Screen

---

i try to the "Theme OFF" and ON PAINT but it seems not to work with BUTTON :?:
what are i´m doing wrong ... need Idea :idea:
KACHEL.ZIP
(2.27 KiB) Downloaded 90 times

Re: Touch Screen : BUTTON, IMAGE and LABEL

Posted: Wed Feb 16, 2022 12:56 pm
by mol
Hi Jimmy!
I'm using LABELS for my touchscreen without any problems and modifications.

Re: Touch Screen : BUTTON, IMAGE and LABEL

Posted: Wed Feb 16, 2022 3:30 pm
by AUGE_OHR
hi Mol,
mol wrote: Wed Feb 16, 2022 12:56 pm I'm using LABELS for my touchscreen without any problems and modifications.
you are right ... if Label have Focus.

in my Demo Sample 1st Touch is "SetFocus" and 2nd Touch is "the Click" ... hm
perhaps it have to do while i create it in a loop in Demo Sample ... any Idea welcome :idea:

Re: Touch Screen : BUTTON, IMAGE and LABEL

Posted: Wed Feb 16, 2022 4:58 pm
by AUGE_OHR
hi,

i have use Form Designer to create Code for LABEL
LABELDBL.ZIP
(995 Bytes) Downloaded 89 times
please try to "click" on LABEL
it need DblClick to get MsgInfo() ... what is going wrong ... :evil:

Mol is right that it should only "One Click" but this Demo does not work that Way, why :?:

Re: Touch Screen : BUTTON, IMAGE and LABEL

Posted: Wed Feb 16, 2022 5:50 pm
by AUGE_OHR
hi,

OK found out that it run on HMG3.5 which have "Original" LIB
i must have "change" something ...

Code: Select all

            //  Label / HyperLink / Image Click .....................
// Original
   	     IF HiWord( wParam ) == STN_DBLCLK  .AND. ( _HMG_SYSDATA[ 1 ] [ i ] = "LABEL" .OR. _HMG_SYSDATA[ 1 ] [ i ] = "IMAGE" )
// Jimmy 24.11.2020
            *IF HiWord( wParam ) == STN_CLICKED .AND. ( _HMG_SYSDATA[ 1 ] [ i ] = "LABEL" .OR. _HMG_SYSDATA[ 1 ] [ i ] = "IMAGE" )
OK, sorry it is my own "BUG" from other Project :cry:

---

in that Project i want 1st. Click on LABEL "just" to setfocus to be able to "move" OR "edit" LABEL
so i have to find other Solution and use "Original" Code in HMG LIB

Re: Touch Screen : BUTTON, IMAGE and LABEL

Posted: Wed Feb 16, 2022 5:53 pm
by mol
Hi!
I was going to test it, but if you found problem, it's OK

Re: Touch Screen : BUTTON, IMAGE and LABEL

Posted: Wed Feb 16, 2022 5:55 pm
by Claudio Ricardo
Hi Jimmy
Perhaps using a variable "lFlag := .F."
and in Label OnClick Iif ( lFlag, GoToYourFunction (), lFlag := .T.) // or a codeblock
First click selects and second click calls the function (you have to add reset then the flag)

Re: Touch Screen : BUTTON, IMAGE and LABEL

Posted: Wed Feb 16, 2022 5:59 pm
by mol
If I undestand well, you want to use labels in two modes - one for normal work and second for design mode?

Re: Touch Screen : BUTTON, IMAGE and LABEL

Posted: Wed Feb 16, 2022 6:34 pm
by andyglezl
AUGE_OHR wrote: Wed Feb 16, 2022 4:58 pm hi,

i have use Form Designer to create Code for LABEL
LABELDBL.ZIP

please try to "click" on LABEL
it need DblClick to get MsgInfo() ... what is going wrong ... :evil:

Mol is right that it should only "One Click" but this Demo does not work that Way, why :?:


????
The demo works with one click...
imagen_2022-02-16_123311.png
imagen_2022-02-16_123311.png (16.66 KiB) Viewed 1188 times

Re: Touch Screen : BUTTON, IMAGE and LABEL

Posted: Wed Feb 16, 2022 9:20 pm
by AUGE_OHR
andyglezl wrote: Wed Feb 16, 2022 6:34 pm ????
The demo works with one click...
sorry it was my fault while i had change it in Source of LIB for HMG :roll:

i have change it on 24.11.2020 "as Newbie" while i had the Source ...
now i know it was not a good Idea to change LIB to get a App run ...

p.s. but i have document it so i found it