GetControls() ignoring TabControl and ScrollBar?

willisgt

Active Member
Licensed User
I've got a generic form which I want to use by creating controls dynamically and placing them on the form. When the form closes, I call GetControls( "formGeneric" ), get the list, and start disposing of controls.

There are three controls on this form: one Label, one TabControl, and one ScrollBar. The label disposes without a problem, but in the list of controls where the names of the TabControl and the ScrollBar should be, it's just blank. A zero-length string.

Am I missing something here?


Gary

:sign0085:


(I should have mentioned that I am using ControlsEX.DLL version 1.0.2995.34468.)
 
Last edited:

willisgt

Active Member
Licensed User
Code

Attached is a minimal example of the problem.
 

agraham

Expert
Licensed User
For clarification.

GetControls("") returns all the controls that B4PPC knows about from its' own central collection of controls.

GetControls("someform") returns the controls from "someform"s' control collection. As only B4PPC native controls (and not all of them) have their name stored within themselves "someforms"s' control collection doesn't know the name of other types of control and so can only return a blank string.

Your best bet is probably to keep a record of controls, and maybe their type, added to each form in a collection of some sort http://www.basic4ppc.com/forum/showthread.php?t=1682 which you can update as you add and dispose external controls.
 
Top