Jump to content
Sign in to follow this  
mattsshwaryn

How do I vertically and horizontally center gui buttons and labels?

Recommended Posts

I have a gui button menu that I use at work using autoit that replaces explorer on startup. In Windows 10 there is no wallpaper without explorer so I want to make the gui fullscreen which I'm able to do but how do I center vertically and horizontally my gui content such as buttons and labels. I also want to be able to add computer info in the bottom right corner which I know how to get the info but not how to place in the bottom right corner. Appreciate any help. Thanks!

Share this post


Link to post
Share on other sites

@mattsshwaryn welcome to the forum. You will get a lot more help if you provide the code for your GUI, rather than asking us to guess ;)

 


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
4 minutes ago, JLogan3o13 said:

@mattsshwaryn welcome to the forum. You will get a lot more help if you provide the code for your GUI, rather than asking us to guess ;)

 

Thanks for the advice! Mostly just looking for general info.

Share this post


Link to post
Share on other sites

Sounds like some basic geometry is what you need.  How does one find the center of an object?  Measure the sides/dimensions and find the mid-points (very easy for a rectangle/desktop).  

Solve for X & Y

Solve for X.png

edit: Center point coordinate [X,Y] = [(Shape W/2)+Shape X , (Shape H/2)+Shape Y]

Edited by spudw2k

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...