| View previous topic :: View next topic |
| Author |
Message |
capulet
Joined: 05 Nov 2004 Posts: 6
|
Posted: Wed Nov 10, 2004 11:24 am Post subject: adding a picture to a gui button |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Wed Nov 10, 2004 12:45 pm Post subject: |
|
|
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 |
|
 |
capulet
Joined: 05 Nov 2004 Posts: 6
|
Posted: Wed Nov 10, 2004 12:48 pm Post subject: |
|
|
| thanx a bunch, I'll get right on it |
|
| Back to top |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Sat Mar 12, 2005 10:46 pm Post subject: |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sun Mar 13, 2005 1:32 am Post subject: |
|
|
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 |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5107 Location: eth0 ::1
|
Posted: Sun Mar 13, 2005 1:45 am Post subject: |
|
|
@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 |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Sun Mar 13, 2005 3:00 am Post subject: |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sun Mar 13, 2005 5:42 pm Post subject: |
|
|
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 |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Sun Mar 13, 2005 6:53 pm Post subject: |
|
|
yes, I hate grabbing the mouse when I invoke a window with a keyboard-hotkey. Well, I'll display the images infront of the buttons.
Tekl |
|
| Back to top |
|
 |
|