C
C#5mo ago
Lutrius

To-Do List Application

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; // Clear the input fields rjTextBoxTitle.Text = string.Empty; rjTextBoxDescription.Text = string.Empty; } 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.
7 Replies
Angius
Angius5mo ago
👍
Lutrius
LutriusOP5mo ago
Sorry bout that, mis type
Frite
Frite5mo ago
When your app is finished, I would use it
Lutrius
LutriusOP5mo ago
thank you but I just need help fixing this first
Salman
Salman5mo ago
$code
MODiX
MODiX5mo ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
Omnissiah
Omnissiah5mo ago
i think we would need more informations to help, like maybe a sketch, or a screenshot where are panelAdd and UC_Penson shown, how should they behave also what is your difficulty in doing this
Want results from more Discord servers?
Add your server