💻 Advanced AutoHotkey tip - Align buttons like a pro on GUIs!
Channel: AUTOHOTKEY Gurus
Date: 2022-09-22

In this video we discuss some advanced tips for aligning buttons on AutoHotkey GUIs.   AutoHotkey GUIs are easy to build but people sometimes get tripped-up when trying to align things.   Isaias Baez gives us some great tips when aligning buttons.

If you're new to AutoHotkey GUIs check out our ahk GUIs are easy course:  https://the-Automator.com/GUIs?src=yt
Summary: Aligning controls using width, height, and positions can make creating buttons easier than using static X and Y locations.

1. 00:00 🔨 Using this method makes creating buttons easier than using static X and Y locations.
 1.1 Creating buttons using static X and Y locations can be a pain, but using this method makes it easier.

2. 01:06 📐 Align controls using width, height, and positions.
 2.1 Align controls relative to one another by using width and height plus positions to move them to the right side of the screen.

3. 02:30 🔧 Subtract 85 pixels from the list view width to adjust the GUI.
 3.1 Subtract 75 pixels for the button and 10 pixels for the margin from the list view width to get the width of the buttons.
 3.2 Adding a button shifts everything over to the left, allowing for easy adjustment of the GUI.

4. 04:35 🤔 Aligning numbers can be tricky, but understanding the concept is key.
 4.1 Adding a new button is as easy as counting the existing buttons and adding 10 pixels of padding.
 4.2 Aligning numbers can be counter-intuitive, but understanding the concept is key.

5. 06:40 🤔 Subtract list view width from button widths to calculate X location of first button.
 5.1 Calculating the width of buttons is easy and based on margins, but manual adjustment may be needed for pixel differences.
 5.2 Subtract the width of the list view from the width of the 3 buttons to calculate the X location of the first button.

6. 08:40 🔧 Change one of the threes to a two and count the margin once for 10 pixels when using two buttons.
 6.1 To remove a button, change one of the threes to a two and count the margin once for 10 pixels.
 6.2 When using two buttons, the margin is 10 pixels to the left and 10 pixels to the right, but when adding a third button, the margin is not Pixel Perfect.

7. 10:49 🧮 Count the buttons and subtract the margins to adjust GUI elements, then use XM X plus five to quickly update.
 7.1 To calculate the number of buttons and margins in a GUI, count the buttons and subtract the left and right margins.
 7.2 Calculate the math to adjust the GUI elements and use XM X plus five to quickly update many things.

8. 13:24 🤩 Check out AHK GUIs for an easy way to create an AutoHotkey!
 8.1 an AHK GUI is the easiest way to create in AutoHotkey, check out the Intro to GUIs course for more information.   https://the-Automator.com/GUIs


Summary for https://youtu.be/Mi7TO-81EXc by www.eightify.app