Functions to tell the control type
Moderator: Rathinagiri
Functions to tell the control type
Morning,
1. How to know a control type ( TEXTBOX, COMBOBOX etc.) from a control name.
( something like VALTYPE() function to know the type of a variable)
thks n rgds
Chang
1. How to know a control type ( TEXTBOX, COMBOBOX etc.) from a control name.
( something like VALTYPE() function to know the type of a variable)
thks n rgds
Chang
Just Hmg It !
Re: Functions to tell the control type
getcontroltype (Ccontrol, CWindow) ='TEXTBOX' vs vs vs vs
If you examine the call maybe that is the answer.
Salim
Bursa-Turkey
*----------------------------
If you examine the call maybe that is the answer.
Salim
Bursa-Turkey
*----------------------------
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Functions to tell the control type
Hola skonuk,
Donde puedo ver esa función? Gracias.
Saludos
//////////////////////////////////////////////////////////////////////////////////
Hello skonuk,
Where I can see that function? Thank you.
regards
Donde puedo ver esa función? Gracias.
Saludos
//////////////////////////////////////////////////////////////////////////////////
Hello skonuk,
Where I can see that function? Thank you.
regards
Re: Functions to tell the control type
Code: Select all
#include "hmg.ch"
Function Main
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 230 HEIGHT 300 ;
TITLE "HMG Demo" ;
MAIN
@ 010,10 LABEL Label_1 VALUE "Label_1" WIDTH 200 ;
TOOLTIP "Label 1"
@ 30,10 COMBOBOX Combo_1 ;
WIDTH 100 ;
ITEMS { '1 | One' , '2 | Two' , '3 | Three' }
@ 50,10 TEXTBOX TEXT_1 WIDTH 100 VALUE ''
@ 80,70 BUTTON Button_1 CAPTION 'TEST_1' ACTION MSGINFO(GETCONTROLTYPE('LABEL_1','FORM_1')) WIDTH 50 HEIGHT 50
@ 120,70 BUTTON Button_2 CAPTION 'TEST_2' ACTION MSGINFO(GETCONTROLTYPE('COMBO_1','FORM_1')) WIDTH 50 HEIGHT 50
@ 150,70 BUTTON Button_3 CAPTION 'TEST_3' ACTION MSGINFO(GETCONTROLTYPE('TEXT_1','FORM_1')) WIDTH 50 HEIGHT 50
END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return Nil
\ HMG \ SOURCE \ H_CONTROLMISC.PRG can SEE
If you search 'GETCONTROLTYPE' in FORUM, YOU WILL SEE FURTHER EXAMPLES.
ESGICI
THERE'RE MISSING FUNCTIONS RELATED TO THIS DOCUMENTATION.
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Functions to tell the control type
Thank you very much for the information.
regards
regards
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Functions to tell the control type
Yes you are right ! There is not any documentation about this important functions. But at least we all have sources codes to be studied.skonuk wrote:THERE'RE MISSING FUNCTIONS RELATED TO THIS DOCUMENTATION.Javier Tovar wrote:Where I can see that function? Thank you.
Just to complement information. There is another also important function to GET type of Control:
GetFocusedControlType()
See here to see a recently example.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Functions to tell the control type
Hola Pablo César,
Gracias por tus enseñanzas! en la semana experimento con estas funciones.
Saludos
Gracias por tus enseñanzas! en la semana experimento con estas funciones.
Saludos