C#C
C#3mo ago
0ri3lla-

help w homework (usercontrol)

this is the task i got:
"Program starts with 2 forms: Dog and Cat (pink).
Each form has:

-arrUC: 2 yellow UserControl1s (each holds Labels).
-Labels: Min_Max_label (“Min/Max), Image_Text_label (“Image/Text), bySize_byBrightness_label (“bySize/byBrightness).
-Rule: “Text“bySize, “Image“byBrightness.
-RadioButtons: Red / Green.
-MinMax_Result_label: small white label for results.

Each UserControl holds an array of Labels with random size, Name (Dog/Cat), and one of 8 defined styles (Dog/Cat, Red/Green, text or image).

Section A (Clicks 1 & 2):
On click → collect Labels into CatList / DogList.
Filter by chosen RadioButton color (background for text, image color for image).
Find Min/Max Label by Min_Max_label + criteria (bySize = area / byBrightness).
Show result in MinMax_Result_label on both forms.

Section B (Clicks 3 & 4):
As a continuation of Section A, all controls from two filtered UserControls
• Should be sorted according to the “by Size” or “by Brightness” text of bySize_byBrightness_label
• Should be displayed in the two UserControls selected by the mouse clicks.

Note: Sections can be combined so that after clicks, both the Min/Max and the sorted order are shown."

Im in section B and I got stuck at a part in my code because whenver i press on my usercontrol i need it to kind of align in one after the other whetere its byasize or bybrightness, but when i click on it just kind of gets arranged one on top of the other... can someone help (i attached a vid of what hppend)?

code : https://paste.mod.gg/zmpfmzbnlucm/0
image.png
image.png
A tool for sharing your source code with the world!
Was this page helpful?