Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to use Wizard functionality in Windows App using C# ASP.NET Pin
Member 1225689023-Nov-16 1:02
Member 1225689023-Nov-16 1:02 
GeneralRe: How to use Wizard functionality in Windows App using C# ASP.NET Pin
Richard MacCutchan23-Nov-16 1:22
mveRichard MacCutchan23-Nov-16 1:22 
GeneralRe: How to use Wizard functionality in Windows App using C# ASP.NET Pin
Afzaal Ahmad Zeeshan23-Nov-16 1:38
professionalAfzaal Ahmad Zeeshan23-Nov-16 1:38 
AnswerRe: How to use Wizard functionality in Windows App using C# ASP.NET Pin
Afzaal Ahmad Zeeshan23-Nov-16 0:38
professionalAfzaal Ahmad Zeeshan23-Nov-16 0:38 
QuestionDatagridView Multi Header Columns & Rows Pin
abboudi_ammar22-Nov-16 11:52
abboudi_ammar22-Nov-16 11:52 
AnswerRe: DatagridView Multi Header Columns & Rows Pin
OriginalGriff22-Nov-16 21:36
mveOriginalGriff22-Nov-16 21:36 
AnswerRe: DatagridView Multi Header Columns & Rows Pin
Afzaal Ahmad Zeeshan23-Nov-16 0:41
professionalAfzaal Ahmad Zeeshan23-Nov-16 0:41 
QuestionHow to index dynamically created controls and their values? Pin
turbosupramk322-Nov-16 8:58
turbosupramk322-Nov-16 8:58 
I have dynamically created controls that I want to use to create and write an output file with.

How can I organize the controls values based on their name?


C#
private TextBox txtBox1 = new TextBox();
private ComboBox cmbx1 = new ComboBox();
private TextBox txtBox2 = new TextBox();
private TextBox txtBox3 = new TextBox();
private Button btn1 = new Button();
int configLineIndex = 1;
private void btnCuRepairConfigAddLine_Click(object sender, EventArgs e)
{
    configLineIndex++;
    tbxHorizontalIndex = 21;

    txtBox1 = new TextBox();
    txtBox1.Name = "line" + configLineIndex + "a";
    int tbxWidth = 285;
    this.txtBox1.Location = new System.Drawing.Point(tbxHorizontalIndex, tbxVerticalIndex + 30);
    this.txtBox1.Size = new System.Drawing.Size(tbxWidth, 20);
    this.Controls.Add(txtBox1);

    cmbx1 = new ComboBox();
    cmbx1.Name = "line" + configLineIndex + "b";
    this.cmbx1.Location = new Point(tbxHorizontalIndex + 299, tbxVerticalIndex + 30);
    this.cmbx1.Size = new Size(121, 21);
    this.cmbx1.Items.Add("addAfter");
    this.cmbx1.Items.Add("addBefore");
    this.cmbx1.Items.Add("Replace");
    this.Controls.Add(cmbx1);

    txtBox2 = new TextBox();
    txtBox2.Name = "line" + configLineIndex + "c";
    tbxWidth = 320;
    this.txtBox2.Location = new System.Drawing.Point(tbxHorizontalIndex + 435, tbxVerticalIndex + 30);
    this.txtBox2.Size = new System.Drawing.Size(tbxWidth, 20);
    this.Controls.Add(txtBox2);

    txtBox3 = new TextBox();
    txtBox3.Name = "line" + configLineIndex + "d";
    tbxWidth = 320;
    this.txtBox3.Location = new System.Drawing.Point(tbxHorizontalIndex + 770, tbxVerticalIndex + 30);
    this.txtBox3.Size = new System.Drawing.Size(tbxWidth, 20);
    this.Controls.Add(txtBox3);

    btn1 = new Button();
    btn1.Name = "line" + configLineIndex + "e";
    this.btn1.Location = new Point(tbxHorizontalIndex + 1110, tbxVerticalIndex + 30);
    this.btn1.Size = new Size(20, 20);
    this.btn1.Text = "X";
    this.Controls.Add(btn1);


    //tbxHorizontalIndex = tbxHorizontalIndex + tbxWidth + 10;
    tbxVerticalIndex = tbxVerticalIndex + 30;
}

AnswerRe: How to index dynamically created controls and their values? Pin
Richard MacCutchan22-Nov-16 10:48
mveRichard MacCutchan22-Nov-16 10:48 
QuestionAssigning Number To Strings Then Sort Pin
MadDashCoder21-Nov-16 19:46
MadDashCoder21-Nov-16 19:46 
AnswerRe: Assigning Number To Strings Then Sort Pin
Pete O'Hanlon21-Nov-16 20:34
mvePete O'Hanlon21-Nov-16 20:34 
GeneralRe: Assigning Number To Strings Then Sort Pin
MadDashCoder22-Nov-16 5:42
MadDashCoder22-Nov-16 5:42 
AnswerRe: Assigning Number To Strings Then Sort Pin
Afzaal Ahmad Zeeshan21-Nov-16 23:34
professionalAfzaal Ahmad Zeeshan21-Nov-16 23:34 
GeneralRe: Assigning Number To Strings Then Sort Pin
Daniel Pfeffer22-Nov-16 0:22
professionalDaniel Pfeffer22-Nov-16 0:22 
GeneralRe: Assigning Number To Strings Then Sort Pin
Afzaal Ahmad Zeeshan22-Nov-16 0:36
professionalAfzaal Ahmad Zeeshan22-Nov-16 0:36 
GeneralRe: Assigning Number To Strings Then Sort Pin
MadDashCoder22-Nov-16 5:23
MadDashCoder22-Nov-16 5:23 
GeneralRe: Assigning Number To Strings Then Sort Pin
Afzaal Ahmad Zeeshan22-Nov-16 5:32
professionalAfzaal Ahmad Zeeshan22-Nov-16 5:32 
AnswerRe: Assigning Number To Strings Then Sort Pin
Gerry Schmitz22-Nov-16 5:35
mveGerry Schmitz22-Nov-16 5:35 
QuestionHow to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Rıza Berkay Ayçelebi21-Nov-16 7:25
Rıza Berkay Ayçelebi21-Nov-16 7:25 
AnswerRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
OriginalGriff21-Nov-16 8:09
mveOriginalGriff21-Nov-16 8:09 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Rıza Berkay Ayçelebi21-Nov-16 8:44
Rıza Berkay Ayçelebi21-Nov-16 8:44 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Dave Kreskowiak21-Nov-16 9:26
mveDave Kreskowiak21-Nov-16 9:26 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Rıza Berkay Ayçelebi21-Nov-16 18:38
Rıza Berkay Ayçelebi21-Nov-16 18:38 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Dave Kreskowiak22-Nov-16 2:32
mveDave Kreskowiak22-Nov-16 2:32 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Pete O'Hanlon21-Nov-16 9:28
mvePete O'Hanlon21-Nov-16 9:28 

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.