15,895,084 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by sadmoh (Top 6 by date)
sadmoh
14-May-18 13:46pm
View
i made my code very simple , any one can run it,
RadioButton[] brb = new RadioButton[20];
GroupBox[] gb = new GroupBox[5];
for (int b = 0; b < 5; b++)
{
GroupBox bg = new GroupBox();
gb[b] = bg;
gb[b].Name = "gb" + b.ToString();
gb[b].Location = new Point(60, 110 + b * 130);
gb[b].Size = new Size(550, 105);
gb[b].Text = "GBox"+b.ToString();
this.Controls.Add(gb[b]);
}
for (int o = 0; o < 5; o++)
{
Label lb = new Label();
lb.Name = lb1 + o.ToString();
sd = "lbl"+o.ToString();
lb.AutoSize = true;
lb.Text = (o + 1).ToString() + " - " + sd;
lb.Location = new Point(100, (100 + o * 130));
lb.Font = new Font(lb.Font, FontStyle.Bold);
this.Controls.Add(lb);
for (int k = 0; k < 4; k++)
{
RadioButton rb = new RadioButton();
brb[k] = rb;
brb[k].Name = "rb" +o.ToString()+ k.ToString();
if (k == 0) brb[k].Checked = true;
brb[k].Text = " - " + "RB"+o.ToString()+ k.ToString();
brb[k].Location = new Point(80, (100 + (o * 130) + (k + 1) * 22));
gb[o].Controls.Add(brb[k]);
this.Controls.Add(brb[k]);
}
gb[o].CausesValidation = true;
gb[o].Enabled = true;
this.Controls.Add(gb[o]);
}
sadmoh
13-May-18 15:07pm
View
u see here i named the groupBoxs as 0,1,2,3,4,and 5 when i want to checked on of the radiobutton in the groupBox numbered 0 , its cleared all radiobutton for all the radiobuttons in all groupBoxes.
sadmoh
13-May-18 15:03pm
View
here is an image for the run time!!!
https://photos.google.com/share/AF1QipM5GGF8OmZlqOGlz44JbMWZ-NuM-8d3fPSb2ZE_c-pIUnFqvDuHe-71Taea4O4lRQ/photo/AF1QipO-EzznCtFlMrtIM9xUtH_KE1eN3OEvMBXkA1dh?key=clJJLWp3Wl84SVBWNDVZWnRrTDhFclBiNU9yVG9B
sadmoh
13-May-18 14:55pm
View
i am sure all the groupBoxes are visible and i see it in the run time,
i will put here an image for the run time.
best regards
sadmoh
13-May-18 3:18am
View
when i remove
this.Controls.Add(rb);
the radiobutton disapeare from the form in the run time
sadmoh
12-May-18 3:39am
View
Deleted
for the first reply , it just a home work and i never leave my database to probloms!!!
and to the second reply i am using what u said!!! but still a problom!!
Show More