AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

glabel when picture clicked not working, because background

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
pantagruel



Joined: 08 Oct 2006
Posts: 69
Location: denmark

PostPosted: Mon Jun 23, 2008 10:58 am    Post subject: glabel when picture clicked not working, because background Reply with quote

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
View user's profile Send private message
BoBo²
Guest





PostPosted: Mon Jun 23, 2008 12:05 pm    Post subject: Reply with quote

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

PostPosted: Mon Jun 23, 2008 12:41 pm    Post subject: the script Reply with quote

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
View user's profile Send private message
BoBo²
Guest





PostPosted: Mon Jun 23, 2008 1:38 pm    Post subject: Reply with quote

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 ... Cool
Back to top
pantagruel



Joined: 08 Oct 2006
Posts: 69
Location: denmark

PostPosted: Mon Jun 23, 2008 10:30 pm    Post subject: not for me Reply with quote

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
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 6084

PostPosted: Mon Jun 23, 2008 10:42 pm    Post subject: Re: glabel when picture clicked not working, because backgro Reply with quote

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:



Smile
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group