Label control focus
Moderator: Rathinagiri
- karweru
- Posts: 220
- Joined: Fri Aug 01, 2008 1:51 pm
- DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
- Contact:
Label control focus
Dear all,
If one clicked on a label, any way to get _getFocusedControl (<windowName>) return the label's control name? I'am getting nil from _getfocusedcontrol()
Any other way to achieve this?
If one clicked on a label, any way to get _getFocusedControl (<windowName>) return the label's control name? I'am getting nil from _getfocusedcontrol()
Any other way to achieve this?
Kind regards,
Gilbert.
Gilbert.
- serge_girard
- Posts: 3167
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Label control focus
Hello Gilbert,
I use this in order to bloc all controls:
Serge
I use this in order to bloc all controls:
Code: Select all
aCtrls := _GetArrayOfAllControlsForForm( "Form_1" )
FOR A = 1 TO LEN(aCtrls)
IF 'BUTTON' $ UPPER(aCtrls [A] [2]) .OR. 'MENU' $ UPPER(aCtrls [A] [2]) .OR. 'COMBO' $ UPPER(aCtrls [A] [2] )
SetProperty('Form_1' , aCtrls [A] [1] , 'Enabled', .f.)
ENDIF
NEXT
There's nothing you can do that can't be done...
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Label control focus
hi,
is a MiniGUI Extended Function ... does it work with HMG
as i knowserge_girard wrote: ↑Thu May 14, 2020 7:17 amCode: Select all
aCtrls := _GetArrayOfAllControlsForForm( "Form_1" )
Code: Select all
_GetArrayOfAllControlsForForm()
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Label control focus
try this
Code: Select all
LOCAL nCol, nRow, hWnd
LOCAL cControl := ""
LOCAL cForm := ""
GetCursorPos (@nCol, @nRow)
hWnd := WindowFromPoint (nCol, nRow)
GetControlNameByHandle( hWnd, @cControl, @cForm )
have fun
Jimmy
Jimmy
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Label control focus
Hi,
see OnClick propr:
Label ... OnClick <ActionProcedureName>
see OnClick propr:
Label ... OnClick <ActionProcedureName>
- serge_girard
- Posts: 3167
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Label control focus
+10 Yes, Claudio , wellcome back!!
Serge
Serge
There's nothing you can do that can't be done...
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Label control focus
Thanks friends!!!
But I'm kind of rusty with Windows programming
But I'm kind of rusty with Windows programming