Touch Screen : BUTTON, IMAGE and LABEL

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Touch Screen : BUTTON, IMAGE and LABEL

Post 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
have fun
Jimmy
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Touch Screen : BUTTON, IMAGE and LABEL

Post by mol »

Hi Jimmy!
I'm using LABELS for my touchscreen without any problems and modifications.
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Touch Screen : BUTTON, IMAGE and LABEL

Post 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:
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Touch Screen : BUTTON, IMAGE and LABEL

Post 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 :?:
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Touch Screen : BUTTON, IMAGE and LABEL

Post 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
have fun
Jimmy
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Touch Screen : BUTTON, IMAGE and LABEL

Post by mol »

Hi!
I was going to test it, but if you found problem, it's OK
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Re: Touch Screen : BUTTON, IMAGE and LABEL

Post 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)
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Touch Screen : BUTTON, IMAGE and LABEL

Post by mol »

If I undestand well, you want to use labels in two modes - one for normal work and second for design mode?
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: Touch Screen : BUTTON, IMAGE and LABEL

Post 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 1187 times
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Touch Screen : BUTTON, IMAGE and LABEL

Post 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
have fun
Jimmy
Post Reply