GUI control is behind background picture

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JensHaglof
Posts: 81
Joined: 04 Jul 2017, 11:41

GUI control is behind background picture

Post by JensHaglof » 07 Jun 2023, 06:26

Hello!

I have a GUI inside a GUI. The parent GUI shows a background image and some controls. The Child GUI shows textboxes.

I can't see the textboxes though. This is the code, stripped down to bare minimum. I can't see the textbox.

Code: Select all

#SingleInstance Force
PathToPic:= ":\03\BGImage.png"
DriveLetter:= SubStr(A_ScriptDir,1,1)

Gui,1: Add, Picture, x0 y0 w1920 h1080 vBackground, %DriveLetter%%PathToPic%
Gui,1: Font, s40
Gui,1: Add, Button, x-10 y-10 w1 h1 +default
Gui,1: Add, Edit, x300 y216 w675 h68 -VScroll vScannerSearch
Gui,1: Show, x400 y400 w1920 h1080, MyGui

Gui,2:+Parent1
Gui,2: Font, s26
Gui,2: Add, Text, x0 y0 w205 h45, Hello
Gui,2: -Caption + AlwaysOnTop
Gui,2: Show, x200 y380 w1380 h600
If I comment out

Code: Select all

;Gui,1: Add, Picture, x0 y0 w1920 h1080 vBackground, %DriveLetter%%PathToPic%
the text Hello is seen. So I guess the background image covers up the text.
How can make sure that the background image is always on bottom?

/Jens

User avatar
mikeyww
Posts: 26890
Joined: 09 Sep 2014, 18:38

Re: GUI control is behind background picture

Post by mikeyww » 07 Jun 2023, 07:21

Hello,

In some cases, changing the order of adding the controls works.

Post Reply

Return to “Ask for Help (v1)”