Skip to content

#169 Resize Unsecure/Secure Configuration fields with the Update Existing Step window - #170

Open
skfd wants to merge 2 commits into
imranakram:masterfrom
comentality:fix/step-form-right-column-layout
Open

#169 Resize Unsecure/Secure Configuration fields with the Update Existing Step window#170
skfd wants to merge 2 commits into
imranakram:masterfrom
comentality:fix/step-form-right-column-layout

Conversation

@skfd

@skfd skfd commented Aug 14, 2026

Copy link
Copy Markdown

Fixes #169

Problem

The three group boxes in the right-hand column of Update Existing Step each used a different anchor set, so none of them could grow vertically:

Group box Anchor Behaviour on vertical resize
Description Top, Left, Right pinned to the top, fixed height
Unsecure Configuration Left, Right (no Top/Bottom) drifted to the vertical centre
Secure Configuration Bottom, Left, Right pinned to the bottom, fixed height

Because Unsecure Configuration was anchored neither to the top nor the bottom, WinForms kept it centred, and all the extra height turned into empty bands between the three fields instead of making the editors bigger.

Fix

The three group boxes now live in a single-column TableLayoutPanel (tlpRightColumn) anchored to all four edges:

  • DescriptionAbsolute, 89F. It is normally a single line, so it keeps its original height instead of consuming space the configuration editors need.
  • Unsecure ConfigurationPercent, 43F
  • Secure ConfigurationPercent, 57F

The 43/57 split preserves the original 129:170 proportion between the two editors, so at the designer size the form is pixel-equivalent to before. Each RichTextBox was already anchored to all four sides, so the text areas themselves grow with their group box.

Before / after

Both captured at a client size of 907x1100.

Before (master) After

At the default 907x445 the layout is unchanged:

Before (master) After

Testing

  • Manual testing on the running tool: resizing the window, and across different DPI settings and display scaling factors.
  • The screenshots above were rendered from the real StepRegistrationForm.Designer.cs of master and of this branch, resized at runtime so the anchor logic is exercised the way it is when the frame is dragged.
  • Solution builds clean.

Notes

  • Only StepRegistrationForm.Designer.cs is touched.
  • The Description field is the one RichTextBox here without WordWrap = false, so a long description wraps to a second line inside its fixed-height box. That behaviour is pre-existing and unchanged by this PR.

skfd added 2 commits August 13, 2026 19:45
…esized

The Description, Unsecure Configuration and Secure Configuration group boxes
each used a different anchor set: Description anchored Top, Secure Configuration
anchored Bottom, and Unsecure Configuration anchored neither, so it drifted to
the vertical centre. Growing the Update Existing Step window therefore spread
the three boxes apart and left large empty bands between them instead of
enlarging the multiline fields.

Host the three group boxes in a single-column TableLayoutPanel anchored to all
four edges, with percentage rows (22/34/44) that reproduce the original
proportions at the designer size and share any extra height between the three
fields.
…nfig fields

The Description field is normally a single line, so growing it with the window
wasted the space the Unsecure/Secure Configuration editors need. Pin its row to
its designer height (89px) and split all remaining height between the two
configuration fields.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • Xrm.Sdk.PluginRegistration/Forms/StepRegistrationForm.Designer.cs: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resizing "Update Existing Step" window does not resize Usecure Configuration, Secure Configuration fields

2 participants