Click here to Skip to main content
15,895,423 members
Home / Discussions / C#
   

C#

 
GeneralRe: Google talk - like application Pin
OriginalGriff17-Feb-10 23:28
mveOriginalGriff17-Feb-10 23:28 
GeneralRe: Google talk - like application Pin
ramzg17-Feb-10 23:48
ramzg17-Feb-10 23:48 
GeneralMessage Closed Pin
17-Feb-10 23:59
stancrm17-Feb-10 23:59 
GeneralRe: Google talk - like application Pin
ramzg18-Feb-10 0:06
ramzg18-Feb-10 0:06 
Questionhow to bind listview data to dataset or datatable.? Pin
sudhir behera17-Feb-10 21:57
sudhir behera17-Feb-10 21:57 
AnswerMessage Closed Pin
17-Feb-10 22:41
stancrm17-Feb-10 22:41 
GeneralRe: how to bind listview data to dataset or datatable.? Pin
sudhir behera18-Feb-10 2:19
sudhir behera18-Feb-10 2:19 
QuestionDistorted Controls Pin
Wamuti17-Feb-10 21:06
Wamuti17-Feb-10 21:06 
Hi. I have controls that are being loaded at run time. Initially when they are loaded they appear as they should be but when i minimize the windows form, and restore it, they add extra spaces between them. This curious behaviour is really threatening my sanity Mad | :mad: because i have gone through the source code (for the 100th time D'Oh! | :doh: )and there appears to be no problem with it. Below is the source:

private void ShowQuestionsAndAnswers(ArrayList questions, ArrayList answers)
        {
           
           
           
            groupBox2.Enabled = true;
            j = 0;

            for (int i = 0; i < questions.Count; i++)
            {
                tbp.Invalidate();
                j = i;
                ArrayList ans = new ArrayList();
                
                GroupBox gb = new GroupBox();
                //gb.AutoSize = true;
                gb.Size = new Size(tbp.Width - 100, 150);
                tbp.Controls.Add(gb); // Adding the groupbox to the main table panel added during design time.
                TableLayoutPanel tbp2 = new TableLayoutPanel();// a panel for the controls inside the group box
                tbp2.ColumnCount = 1; // ensure that there is only one column in the panel inside the group box
                tbp2.AutoSize = true;
                gb.Controls.Add(tbp2);// add the panel in the group box
                // Make the controls (a label and four radiobuttons)i want to use ready
                Label newLabel = new Label();
                //gb.Text = examsQuestions[i].ToString();
                newLabel.Text = (i + 1).ToString() + ". " + questions[i].ToString();
                newLabel.AutoSize = true;
                newLabel.BringToFront();
                newLabel.Size = new Size(1000, 100);
                RadioButton rdb1 = new RadioButton();
                rdb1.AutoSize = true;
                tbp2.SetRow(rdb1, 1);
                rdb1.Text = a[0].ToString();
                rdb1.Click += new EventHandler(rdb_Click);
                


                RadioButton rdb2 = new RadioButton();
                rdb2.AutoSize = true;
                tbp2.SetRow(rdb2, 2);
                rdb2.Text = a[1].ToString(); ;
                rdb2.Click += new EventHandler(rdb_Click);

                RadioButton rdb3 = new RadioButton();
                rdb3.AutoSize = true;
                rdb3.Text = a[2].ToString(); ;
                rdb3.Click += new EventHandler(rdb_Click);

                RadioButton rdb4 = new RadioButton();
                rdb4.AutoSize = true;
                rdb4.Text = a[3].ToString();
                rdb4.Click += new EventHandler(rdb_Click);

                Control[] ctrl = { newLabel,rdb1,rdb2,rdb3,rdb4 };

                tbp2.Controls.AddRange(ctrl);
                a.RemoveRange(0, 5);

            }
           
            Button btnDone = new Button();
            btnDone.Text = "Done";
            btnDone.Click += new EventHandler(btnDone_Click);
            tbp.Controls.Add(btnDone);

            StartTimer();
            

        }



What could be the reason for this and how can i solve it?
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.

modified on Thursday, February 18, 2010 3:12 AM

AnswerRe: Distorted Controls Pin
OriginalGriff17-Feb-10 23:16
mveOriginalGriff17-Feb-10 23:16 
Question[HELP] Plotting readings on graph dynamically Pin
DanielTKS17-Feb-10 20:51
DanielTKS17-Feb-10 20:51 
AnswerMessage Closed Pin
17-Feb-10 21:17
stancrm17-Feb-10 21:17 
GeneralRe: [HELP] Plotting readings on graph dynamically Pin
DanielTKS17-Feb-10 23:06
DanielTKS17-Feb-10 23:06 
AnswerRe: [HELP] Plotting readings on graph dynamically Pin
OriginalGriff17-Feb-10 23:19
mveOriginalGriff17-Feb-10 23:19 
QuestionDrawing text along an elliptic line in GDI Pin
Berlus17-Feb-10 20:40
Berlus17-Feb-10 20:40 
AnswerRe: Drawing text along an elliptic line in GDI Pin
OriginalGriff18-Feb-10 0:19
mveOriginalGriff18-Feb-10 0:19 
QuestionThreads issue Pin
HideIvy17-Feb-10 20:18
HideIvy17-Feb-10 20:18 
AnswerRe: Threads issue Pin
Calla17-Feb-10 20:51
Calla17-Feb-10 20:51 
AnswerRe: Threads issue Pin
Mirko198017-Feb-10 21:52
Mirko198017-Feb-10 21:52 
AnswerRe: Threads issue Pin
Nicholas Butler18-Feb-10 0:25
sitebuilderNicholas Butler18-Feb-10 0:25 
QuestionRe: Threads issue Pin
harold aptroot18-Feb-10 0:48
harold aptroot18-Feb-10 0:48 
AnswerRe: Threads issue Pin
David Skelly18-Feb-10 3:03
David Skelly18-Feb-10 3:03 
AnswerRe: Threads issue Pin
HideIvy18-Feb-10 22:28
HideIvy18-Feb-10 22:28 
Questiontreenodecollection nodes not working as expected with created class [SOLVED] Pin
tonyonlinux17-Feb-10 20:07
tonyonlinux17-Feb-10 20:07 
AnswerRe: treenodecollection nodes not working as expected with created class Pin
Dan Mos17-Feb-10 20:28
Dan Mos17-Feb-10 20:28 
GeneralRe: treenodecollection nodes not working as expected with created class [SOLVED] Pin
tonyonlinux18-Feb-10 1:07
tonyonlinux18-Feb-10 1:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.