Page 1 of 1

Control Property - What type am I ?

Posted: Fri Mar 06, 2009 7:29 am
by skindoc4
I have a generic routine which scrolls through all the controls on a card. Is there a control property I can query which will tell the routine what kind of control the "n"th control actually is ie. is it a field, is it a checkbox, is it a button?

The different control types are treated differently by the routine so it must be able to evaluate the control type. The "style" property is close but not quite and I have been unable to discern a "type" property.

I could of course add a custom property to each control but this is not particularly elegant.

Alex

Posted: Fri Mar 06, 2009 9:20 am
by Klaus
Hi Alex,

you can check:
word 1 of the name of control X

"the name of ..." will return something like:
field "Name of field"
button "name of button"
scrollbar "Name of scrollbar
etc.

So the first word is what you are looking for :-)

If that is a button you can then check "the style of control X" which wil then
return "menu", "checkbox" etc.

Hope that helps.


Best form germany

Klaus

Control Property - What type am I?

Posted: Fri Mar 06, 2009 11:50 am
by skindoc4
Hi Klaus

Just what I was looking for - thanks

Alex