typeOf method is what I'm looking for. In Delphi it's called an is-operator
(if control is checkbox), but that didnt work here.
but thanks for the input anyway.
/Jens
"Steeve Gilbert"
<[EMAIL PROTECTED] To: <[EMAIL PROTECTED]>
-franc.com> cc:
Subject: RE : RE : [development-axapta] deleting controls on a form
04-03-2004 15:31
Please respond to
development-axapta
I've done the same with reports. I've added controls dynamically with the
same name and it seems to work too. But I haven't tried to access them
afterwards. Maybe you can find a function like "typeof" that would tell
you what's the type of the control instead of basing the choice on the
name.
Steeve...
-----Message d'origine-----
De�: Jens Fudge [mailto:[EMAIL PROTECTED]
Envoy�: 4 mars 2004 05:27
��: [EMAIL PROTECTED]
Objet�: RE : [development-axapta] deleting controls on a form
Steeve...
Thanks a lot for your input.
You are right, that could in fact be a way of doing this, however I have
chosen another path.
One of the reasons for choosing another path, is that I want to learn how
to build and use dynamic forms. A thing that I find is quite difficult in
Axapta, compared to my normal programming environment, Delphi.
Anyway, in stead of deleting the controls, I just hide them with there
visible property. The drawback here is that the checkboxes and radiobuttons
still reside in memory, and are not released until the form is closed (I
gather that the garbage collector releases all controls on a form).
To find the controls, I do infact use the controlCount method of the
design, and I do in fact iterate through all controls in a for-loop.
Unfortunatly I cannot seem to be able to figure out what type a given
control is. In the for-loop I get all staticTexts as well as all
checkboxes.
To solve this I give each checkbox a name ('Check'), and compare by the
name and the visibility method. The thing that puzzles me here is that I
actually give all checkboxes the same name, and this seems to work.....
Thanks for your input.
/Jens
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

