Download and install Rapid Layout .NET and opened a new project.
Create a new Windows form. Drag a RapidLayoutPanel onto the form.
Click on the right triangle and choose ‘Dock in parent container’
Click on the right triangle again and choose ‘Add Horizontal Guide’
Click on the right triangle again and choose ‘Add Vertical Guide’
Click on the right hand side connection of the vertical guide and choose ‘Spring + Preferred Length’
Click on the left hand side connection of the vertical guide and choose ‘Preferred Length’
Add three labels to the form
Click and drag the right hand side connection of each of the labels on to the vertical guide
Click on the left hand connection of each label and change the connection type to ‘Spring + Preferred Length’
Click on the right hand connection of each label and change the connection type to ‘Preferred Length’
Set the names of the text of the labels to ‘Name’, ‘Address’ & ‘Telephone Number’. See how the labels right align to the vertical guide
Add three textboxes to the Forms
Drag the left hand connection of each textbox onto the vertical guide. Then click the left hand connection each textbox and change the connection type to ‘Preferred Length’
Click on the target near the top left of a textbox. Then click on the horizontal internal connection that appears. Change the type to ‘Spring + Preferred length’.
Click on the right hand connection of each textbox. Change the connection type to ‘Preferred Length’
Repeat the last two steps for each textbox
Drag the bottom connection of the first textbox onto the top of the second textbox. Drag the top connection of the second textbox onto the bottom of the first textbox. Drag the bottom connection of the second textbox onto the top of the third textbox. Drag the top connection of the third textbox onto the bottom of the second textbox. Drag the bottom connection of the third textbox onto horizontal guide. Change the connections between all the textboxes to ‘Preferred Length’
Drag the top connection of the first label to the top of the first textbox. Drag the bottom connection of the first label to the bottom of the first textbox. Repeat for each label
Change the connection type of the top and bottom connection of each label to ‘Spring’
Add three buttons to the form
Drag the left connection of button three to the right side of button two. Drag the right connection of button two to the left side of button three. Drag the left connection of button two to the right side of button one. Drag the right connection of button one to the left side of button two.
Drag the top connection of each button on to the horizontal guide.
Change the left connection of button one to ‘Spring + Preferred Length’
Change the connection type of the top connection of each button to ‘Preferred Length’
Change the connection type of the connections between the buttons to ‘Preferred Length’. Change the labels on the buttons to ‘Cancel’, ‘Apply’, ‘OK’
Click on the ‘target’ that is near the top left of button one. This will reveal the internal connections
Click and drag the horizontal internal connection of button one on to button two. A purple line will connect the two buttons.
Repeat last two steps to connect button two to button three. All three buttons will now be the same width
Your form is now complete. Try changing the size of the form. See how everything stays aligned
Try changing the font on the items in the form. See how everything stays just the way you want it.
Home / Support / Tutorial / |