FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to get the Control Types in a Dialog?
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
How to get the Control Types in a Dialog?
Posted: Sat Mar 25, 2006 03:14 PM

Can any body help me on how to get the Control Types in a Dialog.

Ex: I have some SAYS, GETS, RADIO BUTTONS, COMBO and BROWSE
controls on a Dialog. And I want to know the type of the current Control one which the user has clicked/pressed Enter Key.

TIA

Regards,

  • Ramesh Babu P
Posts: 108
Joined: Sun Oct 09, 2005 06:12 PM
How to get the Control Types in a Dialog?
Posted: Sat Mar 25, 2006 04:41 PM

Ramesh:

          With oCtrl:ClassName() you will get the name of the control class, like "TGET", "TSAY", "TBUTTON", etc.

Regards,

Daniel Puente
Mar del Plata, Argentina
danielpuente@speedy.com.ar
puenteda@hotmail.com
Posts: 67
Joined: Thu Jan 05, 2006 10:35 PM
Just A sample of what I do
Posted: Sat Mar 25, 2006 05:45 PM

for x = 1 to len(odlg:acontrols)
classn = odlg:acontrols[x]:classname()
default classn:="\"
if classn <> "\"
if classn <> "TGET"
if classn <> "TWBROWSE"
aadd(items,{odlg:acontrols[x]:classname(),;
odlg:acontrols[x]:nid,;
odlg:acontrols[x]:hidden,;
oDlg:aControls[x]:ctitle,x})
ELSE
FOR Y = 1 TO LEN(oDlg:aControls[x]:aheaders)
TXT=TXT+RTRIM(oDlg:aControls[x]:aheaders[Y])+"|"
NEXT
aadd(items,{odlg:acontrols[x]:classname(),;
odlg:acontrols[x]:nid,;
odlg:acontrols[x]:hidden,;
TXT,x})
ENDIF
endif
endif
next

Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
How to get the Control Types in a Dialog?
Posted: Thu Mar 30, 2006 01:22 AM

Thanks to both of you Mr.Mike and Mr.Daniel.

Regards,

  • Ramesh Babu P

Continue the discussion