EFileTahi-A Posted August 2, 2006 Posted August 2, 2006 (edited) Is there a simple method to search for a specific control (by its name) in a form without loops? I need to access a Target control on the form to manipulate its properties, and since its name is a variable I need to find it and grab it. The result should be something like this: Control cCtrl = this.GetControl("controlaName"); Edited August 2, 2006 by EFileTahi-A Quote
EFileTahi-A Posted August 2, 2006 Author Posted August 2, 2006 (edited) I made it. :) Edited August 2, 2006 by EFileTahi-A Quote
EFileTahi-A Posted August 2, 2006 Author Posted August 2, 2006 No! I won't tell you! It's mine! I found it first! Control[] arrCtrls = this.Controls.Find("controlName", true); The boolean value indicates wether should the search include child containers too. :D Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.