Skip to content

Commit

Permalink
Adding table layout panel for middle controls
Browse files Browse the repository at this point in the history
  • Loading branch information
ThioJoe committed Jan 20, 2025
1 parent a575874 commit a107b97
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 164 deletions.
6 changes: 4 additions & 2 deletions DebugUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public static void SetDebugTooltips(Control parent)
{
tooltipOriginalState[control] = toolTip.GetToolTip(control);
}
string dimensions = $"Button: {control.Width}x{control.Height}\nLocation: {control.Location.X} , {control.Location.Y}";
string controlTypeName = control.GetType().Name;
string dimensions = $"{controlTypeName}: {control.Width}x{control.Height}\nLocation: {control.Location.X} , {control.Location.Y}";

// If there's an image on the button or control, also show the image dimensions
if (control is Button button && button.Image != null)
Expand Down Expand Up @@ -79,7 +80,8 @@ private static void HandleToolStrip(ToolStrip toolStrip, bool setDebug)
{
tooltipOriginalState[toolStrip] = item.ToolTipText;
}
item.ToolTipText = $"Button: {item.Width}x{item.Height}";
string controlTypeName = item.GetType().Name;
item.ToolTipText = $"{controlTypeName}: {item.Width}x{item.Height}";

if (item is ToolStripButton toolStripButton && toolStripButton.Image != null)
{
Expand Down
Loading

0 comments on commit a107b97

Please sign in to comment.