Moving Button Location

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
Stgregs
Posts: 3
Last visit: Mon Apr 08, 2024 6:07 pm

Moving Button Location

Post by Stgregs »

Hi Guys,

I'm trying to figure out how to move a button as part of my script. The button changes position to accomodate for more details needed when certain things are selected.
I can see $button.location exists but I can't figure out how to get it to work for me.

Thanks for any help.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Moving Button Location

Post by jvierra »

$button.location = '30,50' # x,y
User avatar
Stgregs
Posts: 3
Last visit: Mon Apr 08, 2024 6:07 pm

Re: Moving Button Location

Post by Stgregs »

Oh my gosh. You would not believe the amount of time I spent on that.
The reason? I left out the speech marks.

Thank you so much.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Moving Button Location

Post by jvierra »

All properties that take a drawing point object will take a string pair.
This topic is 6 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked