can i get help? im new to this and i wanna represent data in a panel
Hi, im new to c# and have no clue how to present the data i need in a panel. In the side panel i want to give the user options to select between 6 options.
1. Home (to go back to the main page)
2. Manage Users (view, add and delete users)
3. View sales report (generated from another users inputs)
4. View customer feed back (from user CUSTOMER)
5. Update own profile (change your own user details)
6. Log out
i want to make it so i can do it all in panel, not sure if thats possible?
26 Replies
What GUI framework and .NET version are you using? What exactly do you mean by "panel"?
windows forms app
I see an "App.config", so .NET Framework 4.x?
just says this
yep
yes
so, .NET framework is the old legacy version, not the modern .NET
it "died" in 2016
im not sure how to change the button names for the codes.. is it a different thing than what i put in them?
I'd highly recommend using modern .NET instead
my computer is pretty old, my class is using this rn
well, you are using VS 2022, so computer wise it would be the same
but ugh, teachers...
"8 years old outdated dead tech is fine to learn, its so future proof!"
ik ;-;
// Assuming you have a Panel named 'adminPanel' and buttons for each option
// Example button names: btnHome, btnManageUsers, btnViewSalesReport, btnViewCustomerFeedback, btnUpdateProfile, btnLogout
private void InitializeAdminMenu()
{
btnHome.Click += BtnHome_Click;
btnManageUsers.Click += BtnManageUsers_Click;
btnViewSalesReport.Click += BtnViewSalesReport_Click;
btnViewCustomerFeedback.Click += BtnViewCustomerFeedback_Click;
btnUpdateProfile.Click += BtnUpdateProfile_Click;
btnLogout.Click += BtnLogout_Click;
}
anyways - what you want can be done in winforms using custom controls
i looked it up on chat gpt on what to do and it says this, how do i change the names so when i code it works?
you would develop each "page" as its own custom control, and then you manage which control is active on the main form
dont use chatgpt for stuff like this
changing the name of a button is easy thou, just click the button in the designer then look at the properties window - it should be at the very top
mind if i go in vc? my english is not good i rather show >.>
your english is fine
different than the text?
yes
:frog_dance:
Text
is what the user sees
(Name)
is what the actual button variable is called
this is only relevant for the programmermmmm makes sense
winforms in 2024, damn, my condolences
winforms is fine as a starting point for GUI, .NET Framework and
DataTable
is not.