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 

adding a picture to a gui button

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



Joined: 05 Nov 2004
Posts: 6

PostPosted: Wed Nov 10, 2004 11:24 am    Post subject: adding a picture to a gui button Reply with quote

Hey all.
I need to make a gui with some buttons, and I'll like to change the appearance of the buttons. Is it possible change the look of a button, to one of my own picks/icons
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed Nov 10, 2004 12:45 pm    Post subject: Reply with quote

Picture buttons are on the to-do list. In the meantime, you could use picture controls with g-labels to detect when you click them. For example:

gui, add, pic, gPicOpen, Open.gif
gui, add, pic, gPicSave, Save.gif
gui, show
return

PicOpen:
MsgBox You clicked the "open" picture.
return

PicSave:
MsgBox You clicked the "save" picture.
return
Back to top
View user's profile Send private message Send e-mail
capulet



Joined: 05 Nov 2004
Posts: 6

PostPosted: Wed Nov 10, 2004 12:48 pm    Post subject: Reply with quote

thanx a bunch, I'll get right on it
Back to top
View user's profile Send private message
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sat Mar 12, 2005 10:46 pm    Post subject: Reply with quote

Hi,

What's going on with picture-buttons? I would like to have button with icon and text. I tried lying the picture over the button, but clicking on the button let the image disappear.

Tekl
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Mar 13, 2005 1:32 am    Post subject: Reply with quote

It's still planned, though currently the main focus is on function calling.

You may already know that you can make a picture clickable by giving it a g-label. In other words, you could make a picture of a button to show as a fake button (without any button control involved at all). I know it's very crude.
Back to top
View user's profile Send private message Send e-mail
Titan



Joined: 11 Aug 2004
Posts: 5107
Location: eth0 ::1

PostPosted: Sun Mar 13, 2005 1:45 am    Post subject: Reply with quote

@Tekl
I know this isn't exactly perfect but if you use a border on your picture with a g-label like Chris said you can achieve something similar to a button with a FlatStyle which isn't so bad.
_________________

RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sun Mar 13, 2005 3:00 am    Post subject: Reply with quote

Thanks, but I was looking for a Button with an image and ALSO text. If BackgroundTrans would work for Buttons I could imagine a workaround.

Tekl
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Mar 13, 2005 5:42 pm    Post subject: Reply with quote

You can put text on top of pictures, and make it look nicer by applying BackgroundTrans to the Text control (so that the picture's background encloses the text). This could become a clickable picture with text on top.

But maybe it's not enough because you want a real button.
Back to top
View user's profile Send private message Send e-mail
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sun Mar 13, 2005 6:53 pm    Post subject: Reply with quote

yes, I hate grabbing the mouse when I invoke a window with a keyboard-hotkey. Smile Well, I'll display the images infront of the buttons.

Tekl
Back to top
View user's profile Send private message Visit poster's website
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