473,387 Members | 1,485 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Dynamically creating an Option button at run time

Hi Friends, I have a visual basic program, i would like to dynamically create an option button at run time, but i don't know how to go about it. Can anyone help...
I'm trying to come up with the login, but all attemp failed...

Thank You.
Johnson.
Feb 13 '07 #1
3 2360
willakawill
1,646 1GB
Hi. Place the control at design time and set the visible property to false. You can then set it to true at runtime and it will magically appear.
Feb 15 '07 #2
it is possible to create controls dynamicaly in vb.
First you place an option button and set its index property to 0 to make it as an ArrayControl. and you can load many instance of this control at run time by using Load Method
like

Expand|Select|Wrap|Line Numbers
  1. Load Option1(1)
  2. Load Option1(2)
  3. Load Option1(3)
  4. Option1(1).Visible = True
  5. Option1(2).Visible = True
  6. Option1(3).Visible = True
Feb 17 '07 #3
willakawill
1,646 1GB
it is possible to create controls dynamicaly in vb.
First you place an option button and set its index property to 0 to make it as an ArrayControl. and you can load many instance of this control at run time by using Load Method
like

Expand|Select|Wrap|Line Numbers
  1. Load Option1(1)
  2. Load Option1(2)
  3. Load Option1(3)
  4. Option1(1).Visible = True
  5. Option1(2).Visible = True
  6. Option1(3).Visible = True
And if you are using anything later than vb6 you will not have access to control arrays
Feb 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: R Duke | last post by:
I have tried everything I can think of to change the visible property of a design time created control from a dynamically created control's command event handler. Here is the scenario. I have...
2
by: Chad | last post by:
I have a problem that I am desperate to understand. It involves dynamically adding controls to a Table control that is built as a result of performing a database query. I am not looking to...
5
by: Dennis Fazekas | last post by:
Greetings, I am creating a web form which will all the user to add an unlimited number of email addresses. Basically I have 3 buttons, "Add Another Email", "-" to remove, and a "Save" button....
5
by: Mike Dee | last post by:
Is it possible to dynamically create a new form object (form1), then create a new form field object and add it form1, and then add form1 to the current document? I need to do all this in script...
2
by: somaskarthic | last post by:
Hi In my php code , i dynamically created table rows on button click event. Each row contain 3 selectboxes, 7 checkboxes . On each click of these elements i need to submit the form and save the...
2
by: jmarendo | last post by:
Hello, After reading through the "Table Basics - DOM - Refer to table cells" example at mredkj.com , I modified the code for my own purposes. In the modified version, I create a hyperlink and...
1
by: semomaniz | last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.