[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Variable # of single line edit boxes in Dialog Box?

Siegfried Heintze

8/28/2002 5:47:00 PM

How do I write a little GUI dialog box that displays a variable number of
edit controls: one for each ";" in my path environment variable?

I would want to be able to scroll up and down if there were too many ";"'s
in the path to fit on the current display. I want to push a button and add a
new edit box when I want to add a directory to my path variable.


1 Answer

Nicholas Paldino [.NET MVP]

8/28/2002 5:57:00 PM

0

Siegfried,

All you have to do is loop through the environment variables and for
each one you come across, call the Add method on the ControlCollection
exposed by your form. Just make sure you position it correctly, and know
how to reference it from the ControlCollection (associate the index in the
collection with the environment variable somewhere).

You can do the same thing for your button handler, just have it create a
new TextBox, and pass it to the Add method of the ControlsCollection
instance exposed by the Controls property on your form.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- nicholas.paldino@exisconsulting.com

"Siegfried Heintze" <siegfried@heintze.com> wrote in message
news:umps51plgcok25@corp.supernews.com...
> How do I write a little GUI dialog box that displays a variable number of
> edit controls: one for each ";" in my path environment variable?
>
> I would want to be able to scroll up and down if there were too many ";"'s
> in the path to fit on the current display. I want to push a button and add
a
> new edit box when I want to add a directory to my path variable.
>
>