Hey guys this is my script for a to do list application:
private async void rjButtonAddNew_Click(object sender, EventArgs e) { // Expand the panel to allow user input panelAdd.Height = 190; }
private void rjButtonSave_Click(object sender, EventArgs e) { // Create a new instance of UC_Penson UC_Penson person = new UC_Penson();
// Assign the text from the input fields to the new UC_Penson instance person.rjTextBoxTitle.Text = rjTextBoxTitle.Text; person.rjTextBoxDescription.Text = rjTextBoxDescription.Text;
// Add the new UC_Penson instance to the FlowLayoutPanel (FLP) FLP.Controls.Add(person);
// Collapse the panel after saving panelAdd.Height = 0;
// Clear the input fields for the next entry rjTextBoxTitle.Text = string.Empty; rjTextBoxDescription.Text = string.Empty; }
private void rjButtonCancel_Click(object sender, EventArgs e) { // Collapse the panel without saving panelAdd.Height = 0;
I want users to edit panelAdd then once they click save the version of panelAdd they edited appears as a new panel. Currently, users click save and only the default UC_Penson design appears without their modifications.
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
C
C#
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.