How to get the Control Types in a Dialog?

How to get the Control Types in a Dialog?

Postby RAMESHBABU » Sat Mar 25, 2006 3: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
User avatar
RAMESHBABU
 
Posts: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Postby DanielPuente » Sat Mar 25, 2006 4: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
DanielPuente
 
Posts: 108
Joined: Sun Oct 09, 2005 6:12 pm
Location: Mar del Plata - Argentina

Just A sample of what I do

Postby Mike Buckler » Sat Mar 25, 2006 5: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
Mike Buckler
 
Posts: 67
Joined: Thu Jan 05, 2006 10:35 pm
Location: Canada

Postby RAMESHBABU » Thu Mar 30, 2006 1:22 am

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

Regards,

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests