Page 1 of 1
Functions to tell the control type
Posted: Mon Jan 20, 2014 3:45 am
by hmgchang
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
Re: Functions to tell the control type
Posted: Mon Jan 20, 2014 5:31 pm
by skonuk
getcontroltype (Ccontrol, CWindow) ='TEXTBOX' vs vs vs vs
If you examine the call maybe that is the answer.
Salim
Bursa-Turkey
*----------------------------
Re: Functions to tell the control type
Posted: Mon Jan 20, 2014 6:09 pm
by Javier Tovar
Hola skonuk,
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
Posted: Mon Jan 20, 2014 7:54 pm
by skonuk
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.
Re: Functions to tell the control type
Posted: Mon Jan 20, 2014 11:34 pm
by Javier Tovar
Thank you very much for the information.
regards
Re: Functions to tell the control type
Posted: Mon May 12, 2014 6:54 am
by hmgchang
Thks mr. Skonuk & mr. Tovar...
Re: Functions to tell the control type
Posted: Mon May 12, 2014 11:08 am
by bpd2000
Functions to tell the control type
Posted: Mon May 12, 2014 11:44 am
by Pablo César
skonuk wrote:Javier Tovar wrote:Where I can see that function? Thank you.
THERE'RE MISSING FUNCTIONS RELATED TO THIS DOCUMENTATION.
Yes you are right ! There is not any documentation about this important functions. But at least we all have sources codes to be studied.
Just to complement information. There is another also important function to GET type of Control:
GetFocusedControlType()
See here to see a recently example.
Re: Functions to tell the control type
Posted: Mon May 12, 2014 4:52 pm
by Javier Tovar
Hola Pablo César,
Gracias por tus enseñanzas! en la semana experimento con estas funciones.
Saludos
Re: Functions to tell the control type
Posted: Tue May 13, 2014 5:35 am
by hmgchang
Thks All for valuable infos...
