From 830197190621e2bdb148546517c34374a416153c Mon Sep 17 00:00:00 2001 From: Michal Buzik Date: Tue, 21 Jul 2026 16:03:43 +0200 Subject: [PATCH] Fix StartEndForm in StandartCameraPurchaseOrder layout and positioning, remove Scroll Bar --- .../TestStartEndForm.cs | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/TBF/Rig/DataEntry/StandartCameraPurchaseOrder/TestStartEndForm.cs b/TBF/Rig/DataEntry/StandartCameraPurchaseOrder/TestStartEndForm.cs index de223f801..4543eaaf5 100644 --- a/TBF/Rig/DataEntry/StandartCameraPurchaseOrder/TestStartEndForm.cs +++ b/TBF/Rig/DataEntry/StandartCameraPurchaseOrder/TestStartEndForm.cs @@ -331,7 +331,7 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder Width = 1420; } - OkButtonPosition(); + PositionBottomControls(); } void OkButtonPosition() @@ -345,6 +345,32 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder ); } } + + private void PositionBottomControls() + { + const int rightMargin = 10; + const int gap = 12; + + // OK vždy úplne vpravo + okButton.Location = new Point( + ClientSize.Width - okButton.Width - rightMargin, + okButton.Location.Y); + + // Checkbox iba v režime End + if (mode == Tst.End) + { + checkBoxEnableStartBox.Location = new Point( + okButton.Left - checkBoxEnableStartBox.Width - gap, + okButton.Top + + (okButton.Height - checkBoxEnableStartBox.Height) / 2); + } + + okButton.Anchor = + AnchorStyles.Bottom | AnchorStyles.Right; + + checkBoxEnableStartBox.Anchor = + AnchorStyles.Bottom | AnchorStyles.Right; + } /// /// Make sure the layout of labels/text boxes on the screen @@ -489,6 +515,8 @@ namespace TBF.Rig.DataEntry.StandartCameraPurchaseOrder imageProcessingThread = new Thread(new ThreadStart(ImageProcessingThread)); imageProcessingThread.Start(); } + + PositionBottomControls(); } ///