 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
pantagruel
Joined: 08 Oct 2006 Posts: 69 Location: denmark
|
Posted: Mon Jun 23, 2008 10:58 am Post subject: glabel when picture clicked not working, because background |
|
|
Hi,
I have a problem with the following bit of code:
| Code: |
Gui, Add, Picture,x0 y0 GMoveit, header_ap_gui.jpg
Gui, Add, Picture, x365 y05 gMinimizeit, minimer.gif
Gui, Add, Picture, x380 y05 gCloseit, close.gif
|
The problem is that the labels in the later pictures are not called, I guess because the moveit label has precedence and it's being called. How do I manage this? 0x40000000 doesn't seem to work. |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Mon Jun 23, 2008 12:05 pm Post subject: |
|
|
| This can't be the whole script (because it wouldn't work that anyway). So, where's the rest?? |
|
| Back to top |
|
 |
pantagruel
Joined: 08 Oct 2006 Posts: 69 Location: denmark
|
Posted: Mon Jun 23, 2008 12:41 pm Post subject: the script |
|
|
example would be the following, if I click on the picture close.gif which has the label gCloseit, it runs the label gMoveit instead.
| Code: |
guiX := A_ScreenWidth - (A_ScreenWidth - 300)
guiY := A_ScreenHeight - (A_ScreenHeight - 200)
guiposition = X%guiX% Y%guiY% w400 h400
Gui -Caption
guiID := WinExist()
Gui Show, %guiposition%, HotKeysTutor ;
WinSet, Region, 0-0 W400 H400 R10-10, HotKeysTutor
Gui, Add, Picture,x0 y0 GMoveit, header_ap_gui.jpg
Gui, Add, Picture, x380 y05 gCloseit, close.gif
Gui, Add, Text, s12 cffffff x5 y50,Win + Ctrl +
Gui, Add, ListView , x0 BackgroundDDDDDD wGrid r12 w400, Key|Runs
Gui Color, +888888
Gui, Add, Picture,x0 y318 0x40000000, footer_ap_gui.jpg
Gui, Add, Button, x15 y350, Ny Genvej
Return
Moveit:
msgBox, Moveit
Return
Closeit:
msgBox, Closeit
Return
|
[/code] |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Mon Jun 23, 2008 1:38 pm Post subject: |
|
|
| Code: | guiX := A_ScreenWidth - (A_ScreenWidth - 300)
guiY := A_ScreenHeight - (A_ScreenHeight - 200)
guiposition = X%guiX% Y%guiY% w400 h400
Gui -Caption
WinSet, Region, 0-0 W400 H400 R10-10, HotKeysTutor
Gui, Add, Picture,x0 y0 GMoveit, %USERPROFILE%\My Documents\My Pictures\icon_arrow_back.PNG
Gui, Add, Picture, x380 y05 gCloseit, %USERPROFILE%\My Documents\My Pictures\icon_arrow_back.PNG
Gui, Add, Text, s12 cffffff x5 y50,Win + Ctrl +
Gui, Add, ListView , x0 BackgroundDDDDDD wGrid r12 w400, Key|Runs
Gui Color, +888888
Gui, Add, Picture,x0 y318 0x40000000, %USERPROFILE%\My Documents\My Pictures\icon_arrow_back.PNG
Gui, Add, Button, x15 y350, Ny Genvej
Gui Show, %guiposition%, HotKeysTutor ;
guiID := WinExist()
Return
Moveit:
msgBox, Moveit
Return
Closeit:
msgBox, Closeit
Return | It's working fine for me ...  |
|
| Back to top |
|
 |
pantagruel
Joined: 08 Oct 2006 Posts: 69 Location: denmark
|
Posted: Mon Jun 23, 2008 10:30 pm Post subject: not for me |
|
|
When I click on the image that calls Closeit and pops up the msgbox that says Closeit, it calls Moveit and pops up the msgBox that says Moveit.
I suppose there must be some way to specify in the options for the image that it gets the click, but not understanding what that way is. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6084
|
Posted: Mon Jun 23, 2008 10:42 pm Post subject: Re: glabel when picture clicked not working, because backgro |
|
|
| pantagruel wrote: | | The problem is that the labels in the later pictures are not called, I guess because the moveit label has precedence and it's being called. |
Do not overlap controls that has glabel.
| Quote: | | How do I manage this? |
Use a background picture without using a gLabel. Then create a transparent text control over the areas where you require a gLabel
You could get an idea from the following post:
 _________________
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|