- if (ShowHelp || ShowReadOnly) {
- mwfFileView.Size = new Size (449, 250);
- fileNameLabel.Location = new Point (102, 298);
- fileNameComboBox.Location = new Point (195, 298);
- fileTypeLabel.Location = new Point (102, 324);
- fileTypeComboBox.Location = new Point (195, 324);
- openSaveButton.Location = new Point (475, 298);
- cancelButton.Location = new Point (475, 324);
- } else {
- mwfFileView.Size = new Size (449, 282);
- fileNameLabel.Location = new Point (102, 330);
- fileNameComboBox.Location = new Point (195, 330);
- fileTypeLabel.Location = new Point (102, 356);
- fileTypeComboBox.Location = new Point (195, 356);
- openSaveButton.Location = new Point (475, 330);
- cancelButton.Location = new Point (475, 356);
- }
-
- if (ShowHelp)
- form.Controls.Add (helpButton);
- else
- form.Controls.Remove (helpButton);
+
+ int fx = form.Size.Width - form.MinimumSize.Width;
+ int fy = form.Size.Height - form.MinimumSize.Height;
+
+ if (!ShowHelp && !ShowReadOnly)
+ fy += 29;
+
+ mwfFileView.Size = new Size (450 + fx, 254 + fy);
+ fileNameLabel.Location = new Point (101, 298 + fy);
+ fileNameComboBox.Location = new Point (195, 298 + fy);
+ fileTypeLabel.Location = new Point (101, 326 + fy);
+ fileTypeComboBox.Location = new Point (195, 326 + fy);
+ openSaveButton.Location = new Point (474 + fx, 298 + fy);
+ cancelButton.Location = new Point (474 + fx, 324 + fy);
+ helpButton.Location = new Point (474 + fx, 353 + fy);
+ readonlyCheckBox.Location = new Point (195, 350 + fy);
+
+ helpButton.Visible = ShowHelp;
+ readonlyCheckBox.Visible = ShowReadOnly;