Page 1 of 1

How to resize GUI control?

Posted: 11 May 2018, 08:55
by Nwb
So I'm making this little app to handily switch between emojis and text styles (mostly for discord). Discord is not a game it's a text based platform (for moderators).

Now the thing is, when I try to use GuiControl to immediately display the border again (they will display only when the user uses his arrow keys), it becomes enormous. How do I resize it's size to how it would have been if I had used the Gui, Add, Picture command (there I set x y width and height, but am not able to or don't know how to do the same with guicontrol)? I am using GuiControl because I want the effect immediately I don't want to destroy the GUI. And this is after the GUI is shown.

I'm clueless. ControlMove didn't work either unless I was doing something wrong, but I have a feeling that is not it.

I tried writing xn yn wn hn after the file path in guicontrol's param 3 but that didn't change anything for the image.

Any leads? Appreciate it!

How it should look:
textmash.png (31.96 KiB) Viewed 976 times

How it looks:
textma.png (43 KiB) Viewed 978 times


Code: Select all

Menu, tray, Icon , general\Logo.ico, 1, 1
Gui, New, +AlwaysOnTop -MinimizeBox, TextMash

Gui, Add, Picture, x2 y-1 w70 h70 +BackgroundTrans vBorder1, general\Border.png
Gui, Add, Picture, x72 y-1 w70 h70 +BackgroundTrans vBorder2, general\Border.png
Gui, Add, Picture, x22 y99 w100 h50 +BackgroundTrans vBorder3, general\Border.png
Gui, Add, Picture, x42 y179 w60 h40 +BackgroundTrans vBorder4, general\Border.png

GuiControl, , Border1
GuiControl, , Border2
GuiControl, , Border3
GuiControl, , Border4

; and some other picture adding 

Gui, Show, x478 y186 h220 w147

GuiControl, , Border3, general\Border.png 
; ^^^ Fault

Re: How to resize GUI control?

Posted: 11 May 2018, 09:31
by Qysh

Re: How to resize GUI control?

Posted: 13 May 2018, 04:12
by Nwb
Bump, appreciate it, looking for more answers. :)

Re: How to resize GUI control?  Topic is solved

Posted: 13 May 2018, 09:43
by Nwb
AHHHHHHHHHHHHHH. Okay for some reason I thought that using Gui, Add' ing a picture would need the GUI to be destroyed in order for the change to be reflected. I donno why I thought that.

But yes just using Gui, add works. lol. Cheers! :D