![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Jun 2006
Location: Fayettehell, NC
Posts: 56
Rep Power: 3
![]() |
Dynamic form from text file.
Ok, new one here. I've been trying to build a form from a text file. What I am trying to do specifically is when a form loads, it attaches to a txt file, reads it line by line, and build a radio button form based on it. This way, if we want to change the look of the form we can just update the txt file, rather then have to re compile the entire app.
What I've done so far is create the ioStreamReader and attached to the file. I was able to list the entire contents to a text box just to make sure the iostream was reading how I wanted it too. Now, i want it to read each line of the document, read to the first ", " and use that text as the app name, and everything after the comma as the path. For each line, i need a bullet w/ app name. I was going to use a substring but i don't think it would do what I want, it would show the ", " and it's not dynamic enough. Also, i'm having a hard time brainstorming on the method to get the Radio button and lable to be generated at the procedure level. I've never done it before and am kind of lost. I know i'll also need to do an X and Y coordinate and increment it as well. Well, any help is appreciated. I'll do some searches google and see what it shows. ![]()
__________________
_Marshall_ "America has bred a society that is innocent and incapable of accepting responsibility, but yet, is able to place blame on others without guilt." |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Jun 2006
Location: Fayettehell, NC
Posts: 56
Rep Power: 3
![]() |
I found this link with some information. Does it sound about right?
http://www.developerfusion.co.uk/forums/post/150908/
__________________
_Marshall_ "America has bred a society that is innocent and incapable of accepting responsibility, but yet, is able to place blame on others without guilt." |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Jun 2006
Location: Fayettehell, NC
Posts: 56
Rep Power: 3
![]() |
I found that the following code will make a radio button.
Dim rbYes As New RadioButton()
rbYes = New RadioButton()
rbYes.Left = 8
rbYes.Top = 300
Me.Controls.Add(rbYes)
rbYes.Text = "YES"The button will say YES next to it. Now, I have to figure out how to make it completely dynamic. I'm assuming I would use variable in all location possible, and on the Top and Left properties, i would increment them as needed. The only part that I wouldn't know right off is how to make the property name dynamic. The rbYes is what I mean. Would i declare it as rbYes(i) or something like that? I appreciate the help. ![]()
__________________
_Marshall_ "America has bred a society that is innocent and incapable of accepting responsibility, but yet, is able to place blame on others without guilt." |
|
|
|
|
|
#4 | |
|
Hobbyist Programmer
|
Quote:
instead, what you probably want to do is this, just keep adding them like so vbnet Syntax (Toggle Plain Text)
now when you want to access it you can do something like this or some variation of it. vbnet Syntax (Toggle Plain Text)
you can also get to a control through its index (ex: me.controls(2))
__________________
I have never let my schooling interfere with my education. -Mark Twain- Xbox live gamertag: melbolt |
|
|
|
|
|
|
#5 |
|
Programmer
Join Date: Jun 2006
Location: Fayettehell, NC
Posts: 56
Rep Power: 3
![]() |
Melbolt, thank you for the reply. I've been constructing a loop in my free time, but i've been put on another project for a couple days so it might be a bit before I can respond. I'll be back, but for now, I've got to ask other questions. Dag nabit.
__________________
_Marshall_ "America has bred a society that is innocent and incapable of accepting responsibility, but yet, is able to place blame on others without guilt." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| converting string to float | beginnerCCC | C | 22 | Oct 2nd, 2006 11:59 PM |
| OnlineTextEditor.Com! | Sane | Show Off Your Open Source Projects | 43 | Jun 16th, 2006 8:55 AM |
| How to detect cursor location and insert text??? | syntax-error | C# | 3 | Jun 30th, 2005 1:42 AM |
| After execution - Error cannot locate /Skin File? | wchar | Visual Basic | 1 | Mar 5th, 2005 9:04 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |